forked from JetBrains/phpstorm-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdate.php
1434 lines (1385 loc) · 42.3 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
// Start of date v.5.3.2-0.dotdeb.1
/**
* Parse about any English textual datetime description into a Unix timestamp
* @link http://php.net/manual/en/function.strtotime.php
* @param string $time <p>
* The string to parse. Before PHP 5.0.0, microseconds weren't allowed in
* the time, since PHP 5.0.0 they are allowed but ignored.
* </p>
* @param int $now [optional] <p>
* The timestamp which is used as a base for the calculation of relative
* dates.
* </p>
* @return int a timestamp on success, false otherwise. Previous to PHP 5.1.0,
* this function would return -1 on failure.
* @since 4.0
* @since 5.0
*/
function strtotime ($time, $now = null) {}
/**
* Format a local time/date
* @link http://php.net/manual/en/function.date.php
* @param string $format <p>
* The format of the outputted date string. See the formatting
* options below. There are also several
* predefined date constants
* that may be used instead, so for example DATE_RSS
* contains the format string 'D, d M Y H:i:s'.
* </p>
* <p>
* The following characters are recognized in the
* format parameter string
* <table>
* <tr valign="top">
* <td>format character</td>
* <td>Description</td>
* <td>Example returned values</td>
* </tr>
* <tr valign="top">
* Day</td>
* <td>---</td>
* <td>---</td>
* </tr>
* <tr valign="top">
* <td>d</td>
* <td>Day of the month, 2 digits with leading zeros</td>
* <td>01 to 31</td>
* </tr>
* <tr valign="top">
* <td>D</td>
* <td>A textual representation of a day, three letters</td>
* <td>Mon through Sun</td>
* </tr>
* <tr valign="top">
* <td>j</td>
* <td>Day of the month without leading zeros</td>
* <td>1 to 31</td>
* </tr>
* <tr valign="top">
* <td>l (lowercase 'L')</td>
* <td>A full textual representation of the day of the week</td>
* <td>Sunday through Saturday</td>
* </tr>
* <tr valign="top">
* <td>N</td>
* <td>ISO-8601 numeric representation of the day of the week (added in
* PHP 5.1.0)</td>
* <td>1 (for Monday) through 7 (for Sunday)</td>
* </tr>
* <tr valign="top">
* <td>S</td>
* <td>English ordinal suffix for the day of the month, 2 characters</td>
* <td>
* st, nd, rd or
* th. Works well with j
* </td>
* </tr>
* <tr valign="top">
* <td>w</td>
* <td>Numeric representation of the day of the week</td>
* <td>0 (for Sunday) through 6 (for Saturday)</td>
* </tr>
* <tr valign="top">
* <td>z</td>
* <td>The day of the year (starting from 0)</td>
* <td>0 through 365</td>
* </tr>
* <tr valign="top">
* Week</td>
* <td>---</td>
* <td>---</td>
* </tr>
* <tr valign="top">
* <td>W</td>
* <td>ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)</td>
* <td>Example: 42 (the 42nd week in the year)</td>
* </tr>
* <tr valign="top">
* Month</td>
* <td>---</td>
* <td>---</td>
* </tr>
* <tr valign="top">
* <td>F</td>
* <td>A full textual representation of a month, such as January or March</td>
* <td>January through December</td>
* </tr>
* <tr valign="top">
* <td>m</td>
* <td>Numeric representation of a month, with leading zeros</td>
* <td>01 through 12</td>
* </tr>
* <tr valign="top">
* <td>M</td>
* <td>A short textual representation of a month, three letters</td>
* <td>Jan through Dec</td>
* </tr>
* <tr valign="top">
* <td>n</td>
* <td>Numeric representation of a month, without leading zeros</td>
* <td>1 through 12</td>
* </tr>
* <tr valign="top">
* <td>t</td>
* <td>Number of days in the given month</td>
* <td>28 through 31</td>
* </tr>
* <tr valign="top">
* Year</td>
* <td>---</td>
* <td>---</td>
* </tr>
* <tr valign="top">
* <td>L</td>
* <td>Whether it's a leap year</td>
* <td>1 if it is a leap year, 0 otherwise.</td>
* </tr>
* <tr valign="top">
* <td>o</td>
* <td>ISO-8601 year number. This has the same value as
* Y, except that if the ISO week number
* (W) belongs to the previous or next year, that year
* is used instead. (added in PHP 5.1.0)</td>
* <td>Examples: 1999 or 2003</td>
* </tr>
* <tr valign="top">
* <td>Y</td>
* <td>A full numeric representation of a year, 4 digits</td>
* <td>Examples: 1999 or 2003</td>
* </tr>
* <tr valign="top">
* <td>y</td>
* <td>A two digit representation of a year</td>
* <td>Examples: 99 or 03</td>
* </tr>
* <tr valign="top">
* Time</td>
* <td>---</td>
* <td>---</td>
* </tr>
* <tr valign="top">
* <td>a</td>
* <td>Lowercase Ante meridiem and Post meridiem</td>
* <td>am or pm</td>
* </tr>
* <tr valign="top">
* <td>A</td>
* <td>Uppercase Ante meridiem and Post meridiem</td>
* <td>AM or PM</td>
* </tr>
* <tr valign="top">
* <td>B</td>
* <td>Swatch Internet time</td>
* <td>000 through 999</td>
* </tr>
* <tr valign="top">
* <td>g</td>
* <td>12-hour format of an hour without leading zeros</td>
* <td>1 through 12</td>
* </tr>
* <tr valign="top">
* <td>G</td>
* <td>24-hour format of an hour without leading zeros</td>
* <td>0 through 23</td>
* </tr>
* <tr valign="top">
* <td>h</td>
* <td>12-hour format of an hour with leading zeros</td>
* <td>01 through 12</td>
* </tr>
* <tr valign="top">
* <td>H</td>
* <td>24-hour format of an hour with leading zeros</td>
* <td>00 through 23</td>
* </tr>
* <tr valign="top">
* <td>i</td>
* <td>Minutes with leading zeros</td>
* <td>00 to 59</td>
* </tr>
* <tr valign="top">
* <td>s</td>
* <td>Seconds, with leading zeros</td>
* <td>00 through 59</td>
* </tr>
* <tr valign="top">
* <td>u</td>
* <td>Microseconds (added in PHP 5.2.2)</td>
* <td>Example: 654321</td>
* </tr>
* <tr valign="top">
* Timezone</td>
* <td>---</td>
* <td>---</td>
* </tr>
* <tr valign="top">
* <td>e</td>
* <td>Timezone identifier (added in PHP 5.1.0)</td>
* <td>Examples: UTC, GMT, Atlantic/Azores</td>
* </tr>
* <tr valign="top">
* <td>I (capital i)</td>
* <td>Whether or not the date is in daylight saving time</td>
* <td>1 if Daylight Saving Time, 0 otherwise.</td>
* </tr>
* <tr valign="top">
* <td>O</td>
* <td>Difference to Greenwich time (GMT) in hours</td>
* <td>Example: +0200</td>
* </tr>
* <tr valign="top">
* <td>P</td>
* <td>Difference to Greenwich time (GMT) with colon between hours and minutes (added in PHP 5.1.3)</td>
* <td>Example: +02:00</td>
* </tr>
* <tr valign="top">
* <td>T</td>
* <td>Timezone abbreviation</td>
* <td>Examples: EST, MDT ...</td>
* </tr>
* <tr valign="top">
* <td>Z</td>
* <td>Timezone offset in seconds. The offset for timezones west of UTC is always
* negative, and for those east of UTC is always positive.</td>
* <td>-43200 through 50400</td>
* </tr>
* <tr valign="top">
* Full Date/Time</td>
* <td>---</td>
* <td>---</td>
* </tr>
* <tr valign="top">
* <td>c</td>
* <td>ISO 8601 date (added in PHP 5)</td>
* <td>2004-02-12T15:19:21+00:00</td>
* </tr>
* <tr valign="top">
* <td>r</td>
* <td>RFC 2822 formatted date</td>
* <td>Example: Thu, 21 Dec 2000 16:01:07 +0200</td>
* </tr>
* <tr valign="top">
* <td>U</td>
* <td>Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)</td>
* <td>See also time</td>
* </tr>
* </table>
* </p>
* <p>
* Unrecognized characters in the format string will be printed
* as-is. The Z format will always return
* 0 when using gmdate.
* </p>
* <p>
* Since this function only accepts integer timestamps the
* u format character is only useful when using the
* date_format function with user based timestamps
* created with date_create.
* </p>
* @param int $timestamp [optional] The optional timestamp parameter is an integer Unix timestamp
* that defaults to the current local time if a timestamp is not given.
* In other words, it defaults to the value of time().
* @return string|bool a formatted date string. If a non-numeric value is used for
* timestamp, false is returned and an
* E_WARNING level error is emitted.
* @since 4.0
* @since 5.0
*/
function date ($format, $timestamp = null) {}
/**
* Format a local time/date as integer
* @link http://php.net/manual/en/function.idate.php
* @param string $format <p>
* <table>
* The following characters are recognized in the
* format parameter string
* <tr valign="top">
* <td>format character</td>
* <td>Description</td>
* </tr>
* <tr valign="top">
* <td>B</td>
* <td>Swatch Beat/Internet Time</td>
* </tr>
* <tr valign="top">
* <td>d</td>
* <td>Day of the month</td>
* </tr>
* <tr valign="top">
* <td>h</td>
* <td>Hour (12 hour format)</td>
* </tr>
* <tr valign="top">
* <td>H</td>
* <td>Hour (24 hour format)</td>
* </tr>
* <tr valign="top">
* <td>i</td>
* <td>Minutes</td>
* </tr>
* <tr valign="top">
* <td>I (uppercase i)</td>
* <td>returns 1 if DST is activated,
* 0 otherwise</td>
* </tr>
* <tr valign="top">
* <td>L (uppercase l)</td>
* <td>returns 1 for leap year,
* 0 otherwise</td>
* </tr>
* <tr valign="top">
* <td>m</td>
* <td>Month number</td>
* </tr>
* <tr valign="top">
* <td>s</td>
* <td>Seconds</td>
* </tr>
* <tr valign="top">
* <td>t</td>
* <td>Days in current month</td>
* </tr>
* <tr valign="top">
* <td>U</td>
* <td>Seconds since the Unix Epoch - January 1 1970 00:00:00 UTC -
* this is the same as time</td>
* </tr>
* <tr valign="top">
* <td>w</td>
* <td>Day of the week (0 on Sunday)</td>
* </tr>
* <tr valign="top">
* <td>W</td>
* <td>ISO-8601 week number of year, weeks starting on
* Monday</td>
* </tr>
* <tr valign="top">
* <td>y</td>
* <td>Year (1 or 2 digits - check note below)</td>
* </tr>
* <tr valign="top">
* <td>Y</td>
* <td>Year (4 digits)</td>
* </tr>
* <tr valign="top">
* <td>z</td>
* <td>Day of the year</td>
* </tr>
* <tr valign="top">
* <td>Z</td>
* <td>Timezone offset in seconds</td>
* </tr>
* </table>
* </p>
* @param int $timestamp [optional]
* @return int an integer.
* </p>
* <p>
* As idate always returns an integer and
* as they can't start with a "0", idate may return
* fewer digits than you would expect. See the example below.
* @since 5.0
*/
function idate ($format, $timestamp = null) {}
/**
* Format a GMT/UTC date/time
* @link http://php.net/manual/en/function.gmdate.php
* @param string $format <p>
* The format of the outputted date string. See the formatting
* options for the date function.
* </p>
* @param int $timestamp [optional]
* @return string a formatted date string. If a non-numeric value is used for
* timestamp, false is returned and an
* E_WARNING level error is emitted.
* @since 4.0
* @since 5.0
*/
function gmdate ($format, $timestamp = null) {}
/**
* Get Unix timestamp for a date
* @link http://php.net/manual/en/function.mktime.php
* @param int $hour [optional] <p>
* The number of the hour.
* </p>
* @param int $minute [optional] <p>
* The number of the minute.
* </p>
* @param int $second [optional] <p>
* The number of seconds past the minute.
* </p>
* @param int $month [optional] <p>
* The number of the month.
* </p>
* @param int $day [optional] <p>
* The number of the day.
* </p>
* @param int $year [optional] <p>
* The number of the year, may be a two or four digit value,
* with values between 0-69 mapping to 2000-2069 and 70-100 to
* 1970-2000. On systems where time_t is a 32bit signed integer, as
* most common today, the valid range for year
* is somewhere between 1901 and 2038. However, before PHP 5.1.0 this
* range was limited from 1970 to 2038 on some systems (e.g. Windows).
* </p>
* @param int $is_dst [optional] <p>
* Deprecated since 5.3.0 - use Use the new timezone handling functions instead.<p>
* This parameter can be set to 1 if the time is during daylight savings time (DST),
* 0 if it is not, or -1 (the default) if it is unknown whether the time is within
* daylight savings time or not. If it's unknown, PHP tries to figure it out itself.
* This can cause unexpected (but not incorrect) results.
* Some times are invalid if DST is enabled on the system PHP is running on or
* is_dst is set to 1. If DST is enabled in e.g. 2:00, all times
* between 2:00 and 3:00 are invalid and mktime returns an undefined
* (usually negative) value.
* Some systems (e.g. Solaris 8) enable DST at midnight so time 0:30 of the day when DST
* is enabled is evaluated as 23:30 of the previous day.
* </p>
* <p>
* As of PHP 5.1.0, this parameter became deprecated. As a result, the
* new timezone handling features should be used instead.
* </p>
* @return int mktime returns the Unix timestamp of the arguments
* given.
* If the arguments are invalid, the function returns false (before PHP 5.1
* it returned -1).
* @since 4.0
* @since 5.0
*/
function mktime ($hour = null, $minute = null, $second = null, $month = null, $day = null, $year = null, $is_dst = null) {}
/**
* Get Unix timestamp for a GMT date
* @link http://php.net/manual/en/function.gmmktime.php
* @param int $hour [optional] <p>
* The hour
* </p>
* @param int $minute [optional] <p>
* The minute
* </p>
* @param int $second [optional] <p>
* The second
* </p>
* @param int $month [optional] <p>
* The month
* </p>
* @param int $day [optional] <p>
* The day
* </p>
* @param int $year [optional] <p>
* The year
* </p>
* @param int $is_dst [optional] <p>
* Parameters always represent a GMT date so is_dst
* doesn't influence the result.
* </p>
* @return int a integer Unix timestamp.
* @since 4.0
* @since 5.0
*/
function gmmktime ($hour = null, $minute = null, $second = null, $month = null, $day = null, $year = null, $is_dst = null) {}
/**
* Validate a Gregorian date
* @link http://php.net/manual/en/function.checkdate.php
* @param int $month <p>
* The month is between 1 and 12 inclusive.
* </p>
* @param int $day <p>
* The day is within the allowed number of days for the given
* month. Leap years
* are taken into consideration.
* </p>
* @param int $year <p>
* The year is between 1 and 32767 inclusive.
* </p>
* @return bool true if the date given is valid; otherwise returns false.
* @since 4.0
* @since 5.0
*/
function checkdate ($month, $day, $year) {}
/**
* Format a local time/date according to locale settings
* The following characters are recognized in the
* format parameter string
* <table>
* <tr valign="top">
* <td>format</td>
* <td>Description</td>
* <td>Example returned values</td>
* </tr>
* <th valign="top" colspan="3" bgcolor="silver">
* Day</th>
* </tr>
* <tr valign="top">
* <td>%a</td>
* <td>An abbreviated textual representation of the day</td>
* <td>Sun through Sat</td>
* </tr>
* <tr valign="top">
* <td>%A</td>
* <td>A full textual representation of the day</td>
* <td>Sunday through Saturday</td>
* </tr>
* <tr valign="top">
* <td>%d</td>
* <td>Two-digit day of the month (with leading zeros)</td>
* <td>01 to 31</td>
* </tr>
* <tr valign="top">
* <td>%e</td>
* <td>Day of the month, with a space preceding single digits</td>
* <td> 1 to 31</td>
* </tr>
* <tr valign="top">
* <td>%j</td>
* <td>Day of the year, 3 digits with leading zeros</td>
* <td>001 to 366</td>
* </tr>
* <tr valign="top">
* <td>%u</td>
* <td>ISO-8601 numeric representation of the day of the week</td>
* <td>1 (for Monday) though 7 (for Sunday)</td>
* </tr>
* <tr valign="top">
* <td>%w</td>
* <td>Numeric representation of the day of the week</td>
* <td>0 (for Sunday) through 6 (for Saturday)</td>
* </tr>
* <tr valign="top">
* <th colspan="3" bgcolor="silver">Week</th>
* </tr>
* <tr valign="top">
* <td>%U</td>
* <td>Week number of the given year, starting with the first
* Sunday as the first week</td>
* <td>13 (for the 13th full week of the year)</td>
* </tr>
* <tr valign="top">
* <td>%V</td>
* <td>ISO-8601:1988 week number of the given year, starting with
* the first week of the year with at least 4 weekdays, with Monday
* being the start of the week</td>
* <td>01 through 53 (where 53
* accounts for an overlapping week)</td>
* </tr>
* <tr valign="top">
* <td>%W</td>
* <td>A numeric representation of the week of the year, starting
* with the first Monday as the first week</td>
* <td>46 (for the 46th week of the year beginning
* with a Monday)</td>
* </tr>
* <tr valign="top">
* <th colspan="3" bgcolor="silver">Month</th>
* </tr>
* <tr valign="top">
* <td>%b</td>
* <td>Abbreviated month name, based on the locale</td>
* <td>Jan through Dec</td>
* </tr>
* <tr valign="top">
* <td>%B</td>
* <td>Full month name, based on the locale</td>
* <td>January through December</td>
* </tr>
* <tr valign="top">
* <td>%h</td>
* <td>Abbreviated month name, based on the locale (an alias of %b)</td>
* <td>Jan through Dec</td>
* </tr>
* <tr valign="top">
* <td>%m</td>
* <td>Two digit representation of the month</td>
* <td>01 (for January) through 12 (for December)</td>
* </tr>
* <tr valign="top">
* <th colspan="3" bgcolor="silver">Year</th>
* </tr>
* <tr valign="top">
* <td>%C</td>
* <td>Two digit representation of the century (year divided by 100, truncated to an integer)</td>
* <td>19 for the 20th Century</td>
* </tr>
* <tr valign="top">
* <td>%g</td>
* <td>Two digit representation of the year going by ISO-8601:1988 standards (see %V)</td>
* <td>Example: 09 for the week of January 6, 2009</td>
* </tr>
* <tr valign="top">
* <td>%G</td>
* <td>The full four-digit version of %g</td>
* <td>Example: 2008 for the week of January 3, 2009</td>
* </tr>
* <tr valign="top">
* <td>%y</td>
* <td>Two digit representation of the year</td>
* <td>Example: 09 for 2009, 79 for 1979</td>
* </tr>
* <tr valign="top">
* <td>%Y</td>
* <td>Four digit representation for the year</td>
* <td>Example: 2038</td>
* </tr>
* <tr valign="top">
* <th colspan="3" bgcolor="silver">Time</th>
* </tr>
* <tr valign="top">
* <td>%H</td>
* <td>Two digit representation of the hour in 24-hour format</td>
* <td>00 through 23</td>
* </tr>
* <tr valign="top">
* <td>%I</td>
* <td>Two digit representation of the hour in 12-hour format</td>
* <td>01 through 12</td>
* </tr>
* <tr valign="top">
* <td>%l (lower-case 'L')</td>
* <td>Hour in 12-hour format, with a space preceeding single digits</td>
* <td> 1 through 12</td>
* </tr>
* <tr valign="top">
* <td>%M</td>
* <td>Two digit representation of the minute</td>
* <td>00 through 59</td>
* </tr>
* <tr valign="top">
* <td>%p</td>
* <td>UPPER-CASE 'AM' or 'PM' based on the given time</td>
* <td>Example: AM for 00:31, PM for 22:23</td>
* </tr>
* <tr valign="top">
* <td>%P</td>
* <td>lower-case 'am' or 'pm' based on the given time</td>
* <td>Example: am for 00:31, pm for 22:23</td>
* </tr>
* <tr valign="top">
* <td>%r</td>
* <td>Same as "%I:%M:%S %p"</td>
* <td>Example: 09:34:17 PM for 21:34:17</td>
* </tr>
* <tr valign="top">
* <td>%R</td>
* <td>Same as "%H:%M"</td>
* <td>Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM</td>
* </tr>
* <tr valign="top">
* <td>%S</td>
* <td>Two digit representation of the second</td>
* <td>00 through 59</td>
* </tr>
* <tr valign="top">
* <td>%T</td>
* <td>Same as "%H:%M:%S"</td>
* <td>Example: 21:34:17 for 09:34:17 PM</td>
* </tr>
* <tr valign="top">
* <td>%X</td>
* <td>Preferred time representation based on locale, without the date</td>
* <td>Example: 03:59:16 or 15:59:16</td>
* </tr>
* <tr valign="top">
* <td>%z</td>
* <td>Either the time zone offset from UTC or the abbreviation (depends
* on operating system)</td>
* <td>Example: -0500 or EST for Eastern Time</td>
* </tr>
* <tr valign="top">
* <td>%Z</td>
* <td>The time zone offset/abbreviation option NOT given by %z (depends
* on operating system)</td>
* <td>Example: -0500 or EST for Eastern Time</td>
* </tr>
* <tr valign="top">
* <th colspan="3" bgcolor="silver">Time and Date Stamps</th>
* </tr>
* <tr valign="top">
* <td>%c</td>
* <td>Preferred date and time stamp based on local</td>
* <td>Example: Tue Feb 5 00:45:10 2009 for
* February 4, 2009 at 12:45:10 AM</td>
* </tr>
* <tr valign="top">
* <td>%D</td>
* <td>Same as "%m/%d/%y"</td>
* <td>Example: 02/05/09 for February 5, 2009</td>
* </tr>
* <tr valign="top">
* <td>%F</td>
* <td>Same as "%Y-%m-%d" (commonly used in database datestamps)</td>
* <td>Example: 2009-02-05 for February 5, 2009</td>
* </tr>
* <tr valign="top">
* <td>%s</td>
* <td>Unix Epoch Time timestamp (same as the time
* function)</td>
* <td>Example: 305815200 for September 10, 1979 08:40:00 AM</td>
* </tr>
* <tr valign="top">
* <td>%x</td>
* <td>Preferred date representation based on locale, without the time</td>
* <td>Example: 02/05/09 for February 5, 2009</td>
* </tr>
* <tr valign="top">
* <th colspan="3" bgcolor="silver">Miscellaneous</th>
* </tr>
* <tr valign="top">
* <td>%n</td>
* <td>A newline character ("\n")</td>
* <td>---</td>
* </tr>
* <tr valign="top">
* <td>%t</td>
* <td>A Tab character ("\t")</td>
* <td>---</td>
* </tr>
* <tr valign="top">
* <td>%%</td>
* <td>A literal percentage character ("%")</td>
* <td>---</td>
* </tr>
* </table>
* </p>
* <p>
* Maximum length of this parameter is 1023 characters.
* </p>
* Contrary to ISO-9899:1999, Sun Solaris starts with Sunday as 1.
* As a result, %u may not function as described in this manual.
* @link http://php.net/manual/en/function.strftime.php
* @param string $format <p>
* @param int $timestamp [optional] defaults to the value of time()
* Unix timestamp that defaults to the current local time if a timestamp is not given..
* @return string a string formatted according format
* using the given timestamp or the current
* local time if no timestamp is given. Month and weekday names and
* other language-dependent strings respect the current locale set
* with setlocale.
* @since 4.0
* @since 5.0
*/
function strftime ($format, $timestamp) {}
/**
* Format a GMT/UTC time/date according to locale settings
* @link http://php.net/manual/en/function.gmstrftime.php
* @param string $format <p>
* See description in strftime.
* </p>
* @param int $timestamp [optional]
* @return string a string formatted according to the given format string
* using the given timestamp or the current
* local time if no timestamp is given. Month and weekday names and
* other language dependent strings respect the current locale set
* with setlocale.
* @since 4.0
* @since 5.0
*/
function gmstrftime ($format, $timestamp = null) {}
/**
* Return current Unix timestamp
* @link http://php.net/manual/en/function.time.php
* @return int <p>Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).</p>
* @since 4.0
* @since 5.0
*/
function time () {}
/**
* Get the local time
* @link http://php.net/manual/en/function.localtime.php
* @param int $timestamp [optional]
* @param bool $is_associative [optional] <p>
* If set to false or not supplied then the array is returned as a regular,
* numerically indexed array. If the argument is set to true then
* localtime returns an associative array containing
* all the different elements of the structure returned by the C
* function call to localtime. The names of the different keys of
* the associative array are as follows:
* </p>
* <p>
* "tm_sec" - seconds
* @return array
* @since 4.0
* @since 5.0
*/
function localtime ($timestamp = null, $is_associative = null) {}
/**
* Get date/time information
* @link http://php.net/manual/en/function.getdate.php
* @param int $timestamp [optional]
* @return array an associative array of information related to
* the timestamp. Elements from the returned
* associative array are as follows:
* </p>
* <p>
* <table>
* Key elements of the returned associative array
* <tr valign="top">
* <td>Key</td>
* <td>Description</td>
* <td>Example returned values</td>
* </tr>
* <tr valign="top">
* <td>"seconds"</td>
* <td>Numeric representation of seconds</td>
* <td>0 to 59</td>
* </tr>
* <tr valign="top">
* <td>"minutes"</td>
* <td>Numeric representation of minutes</td>
* <td>0 to 59</td>
* </tr>
* <tr valign="top">
* <td>"hours"</td>
* <td>Numeric representation of hours</td>
* <td>0 to 23</td>
* </tr>
* <tr valign="top">
* <td>"mday"</td>
* <td>Numeric representation of the day of the month</td>
* <td>1 to 31</td>
* </tr>
* <tr valign="top">
* <td>"wday"</td>
* <td>Numeric representation of the day of the week</td>
* <td>0 (for Sunday) through 6 (for Saturday)</td>
* </tr>
* <tr valign="top">
* <td>"mon"</td>
* <td>Numeric representation of a month</td>
* <td>1 through 12</td>
* </tr>
* <tr valign="top">
* <td>"year"</td>
* <td>A full numeric representation of a year, 4 digits</td>
* <td>Examples: 1999 or 2003</td>
* </tr>
* <tr valign="top">
* <td>"yday"</td>
* <td>Numeric representation of the day of the year</td>
* <td>0 through 365</td>
* </tr>
* <tr valign="top">
* <td>"weekday"</td>
* <td>A full textual representation of the day of the week</td>
* <td>Sunday through Saturday</td>
* </tr>
* <tr valign="top">
* <td>"month"</td>
* <td>A full textual representation of a month, such as January or March</td>
* <td>January through December</td>
* </tr>
* <tr valign="top">
* <td>0</td>
* <td>
* Seconds since the Unix Epoch, similar to the values returned by
* time and used by date.
* </td>
* <td>
* System Dependent, typically -2147483648 through
* 2147483647.
* </td>
* </tr>
* </table>
* @since 4.0
* @since 5.0
*/
function getdate ($timestamp = null) {}
/**
* Returns new DateTime object
* @link http://php.net/manual/en/function.date-create.php
* @param string $time [optional] <p>
* String in a format accepted by strtotime.
* </p>
* @param DateTimeZone $timezone [optional] <p>
* Time zone of the time.
* </p>
* @return DateTime DateTime object on success or false on failure.
* @since 5.2.0
*/
function date_create ($time = null, DateTimeZone $timezone = null ) {}
/**
* (PHP 5.5)<br/>
* Alias for DateTimeImmutable::__construct()
* Returns new DateTimeImmutable object
* @link http://php.net/manual/en/function.date-create-immutable.php
* @see DateTimeImmutable::__construct()
* @param string $time [optional] <p>
* String in a format accepted by strtotime.
* </p>
* @param DateTimeZone $timezone [optional] <p>
* Time zone of the time.
* </p>
* @return DateTimeImmutable DateTime object on success or false on failure.
*/
function date_create_immutable ($time = null, DateTimeZone $timezone = null ) {}
/**
* Alias:
* {@see DateTime::createFromFormat}
* @link http://php.net/manual/en/function.date-create-from-format.php
* @param string $format Format accepted by <a href="http://us.php.net/manual/en/function.date.php">date()</a>.
* <p>If format does not contain the character ! then portions of the generated time which are not specified in format will be set to the current system time.
* <p>If format contains the character !, then portions of the generated time not provided in format, as well as values to the left-hand side of the !, will be set to corresponding values from the Unix epoch.
* <p>The Unix epoch is 1970-01-01 00:00:00 UTC.
* @param string $time String representing the time.
* @param DateTimeZone $timezone [optional] A DateTimeZone object representing the desired time zone.
* @return DateTime <p> Returns a new
* {@see DateTime} instance or <b>FALSE</b> on failure.</p>
* @since 5.3.0
*/
function date_create_from_format ($format, $time, $timezone = null) {}
/**
* Returns associative array with detailed info about given date
* @link http://php.net/manual/en/function.date-parse.php
* @param string $date <p>
* Date in format accepted by strtotime.
* </p>
* @return array array with information about the parsed date
* on success or false on failure.
* @since 5.2.0
*/
function date_parse ($date) {}
/**
* Get info about given date
* @link http://php.net/manual/en/function.date-parse-from-format.php
* @param string $format <p>
* Format accepted by date with some extras.
* </p>
* @param string $date <p>
* String representing the date.
* </p>
* @return array associative array with detailed info about given date.
* @since 5.3.0
*/
function date_parse_from_format ($format, $date) {}
/**
* Alias:
* {@see DateTime::getLastErrors}
* @link http://php.net/manual/en/function.date-get-last-errors.php
* @return array <p>Returns array containing info about warnings and errors.</p>
* @since 5.3.0
*/
function date_get_last_errors () {}
/**
* Alias:
* {@see DateTime::format}
* @link http://php.net/manual/en/function.date-format.php
* @param $object
* @param $format
* @return string|bool formatted date string on success or <b>FALSE</b> on failure.
* @since 5.2.0
*/
function date_format ($object, $format) {}
/**
* Alter the timestamp of a DateTime object by incrementing or decrementing
* in a format accepted by strtotime().
* Alias:
* {@see DateTime::modify}
* @link http://php.net/manual/en/function.date-modify.php
* @param DateTime $object A DateTime object returned by date_create(). The function modifies this object.
* @param string $modify A date/time string. Valid formats are explained in {@link http://www.php.net/manual/en/datetime.formats.php Date and Time Formats}.
* @return DateTime|boolean Returns the DateTime object for method chaining or <b>FALSE</b> on failure.