-
Notifications
You must be signed in to change notification settings - Fork 0
/
Date.php
59 lines (51 loc) · 1.48 KB
/
Date.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php declare(strict_types = 1);
/*
* This file is part of the Vairogs package.
*
* (c) Dāvis Zālītis (k0d3r1s) <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Vairogs\Component\Functions;
final class Date
{
use Date\_Date;
use Date\_DateNullable;
use Date\_DateWithoutFormat;
use Date\_ExcelDate;
use Date\_FormatDate;
use Date\_FromUnixTimestamp;
use Date\_TimeFormat;
use Date\_ValidateDate;
use Date\_ValidateDateBasic;
public const array EXTRA_FORMATS = [
self::FORMAT,
self::FORMAT_TS,
];
public const array TIME = [
'hour' => self::HOUR,
'minute' => self::MIN,
'second' => self::SEC,
'micro' => self::MS,
];
public const int JAN = 31;
public const int FEB = 28;
public const int FEB_LONG = 29;
public const int MAR = 31;
public const int APR = 30;
public const int MAY = 31;
public const int JUN = 30;
public const int JUL = 31;
public const int AUG = 31;
public const int SEP = 30;
public const int OCT = 31;
public const int NOV = 30;
public const int DEC = 31;
public const int HOUR = 60 * self::MIN;
public const int MIN = 60 * self::SEC;
public const int MS = 1;
public const int SEC = 1000 * self::MS;
public const string FORMAT = 'd-m-Y H:i:s';
public const string FORMAT_TS = 'D M d Y H:i:s T';
}