Annotation of embedaddon/php/ext/date/tests/gmdate_variation5.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test gmdate() function : usage variation - Passing Week representation to format.
3: --FILE--
4: <?php
5: /* Prototype : string gmdate(string format [, long timestamp])
6: * Description: Format a GMT date/time
7: * Source code: ext/date/php_date.c
8: * Alias to functions:
9: */
10:
11: echo "*** Testing gmdate() : usage variation ***\n";
12:
13: // Initialise all required variables
14: date_default_timezone_set('UTC');
15: $timestamp = mktime(8, 8, 8, 8, 8, 2008);
16:
17: echo "\n-- Testing gmdate() function with ISO-8601 week number of year format --\n";
18: var_dump( gmdate('W') );
19: var_dump( gmdate('W', $timestamp) );
20:
21: ?>
22: ===DONE===
23: --EXPECTF--
24: *** Testing gmdate() : usage variation ***
25:
26: -- Testing gmdate() function with ISO-8601 week number of year format --
27: string(%d) "%d"
28: string(2) "32"
29: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>