Skip to content

Commit

Permalink
feat: add time constants
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jun 7, 2023
1 parent 7499223 commit 17ab452
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions RockMigrations.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ class RockMigrations extends WireData implements Module, ConfigurableModule
const field_pagename = "_pw_page_name";
const field_email = "email";

// time constants (seconds)
// see https://i.imgur.com/vfTasHa.png
const oneMinute = 60;
const oneHour = self::oneMinute * 60;
const oneDay = self::oneHour * 24;
const oneWeek = self::oneDay * 7;
const oneMonth = self::oneDay * 30;
const oneYear = self::oneDay * 365;

/** @var WireData */
public $conf;

Expand Down

0 comments on commit 17ab452

Please sign in to comment.