Annotation of embedaddon/php/ext/date/tests/gmdate_variation6.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test gmdate() function : usage variation - Passing Month format options to format argument.
        !             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 full textual representation of month format --\n";
        !            18: var_dump( gmdate('F') );
        !            19: var_dump( gmdate('F', $timestamp) );
        !            20: 
        !            21: echo "\n-- Testing gmdate() function with numeric representation of month format --\n";
        !            22: var_dump( gmdate('m') );
        !            23: var_dump( gmdate('m', $timestamp) );
        !            24: 
        !            25: echo "\n-- Testing gmdate() function with short textual representation of month format --\n";
        !            26: var_dump( gmdate('M') );
        !            27: var_dump( gmdate('M', $timestamp) );
        !            28: 
        !            29: echo "\n-- Testing gmdate() function with numeric representation of month without leading zeros format --\n";
        !            30: var_dump( gmdate('n') );
        !            31: var_dump( gmdate('n', $timestamp) );
        !            32: 
        !            33: echo "\n-- Testing gmdate() function with number of days in a month format --\n";
        !            34: var_dump( gmdate('t') );
        !            35: var_dump( gmdate('t', $timestamp) );
        !            36: 
        !            37: ?>
        !            38: ===DONE===
        !            39: --EXPECTF--
        !            40: *** Testing gmdate() : usage variation ***
        !            41: 
        !            42: -- Testing gmdate() function with full textual representation of month format --
        !            43: string(%d) "%s"
        !            44: string(6) "August"
        !            45: 
        !            46: -- Testing gmdate() function with numeric representation of month format --
        !            47: string(%d) "%d"
        !            48: string(2) "08"
        !            49: 
        !            50: -- Testing gmdate() function with short textual representation of month format --
        !            51: string(%d) "%s"
        !            52: string(3) "Aug"
        !            53: 
        !            54: -- Testing gmdate() function with numeric representation of month without leading zeros format --
        !            55: string(%d) "%d"
        !            56: string(1) "8"
        !            57: 
        !            58: -- Testing gmdate() function with number of days in a month format --
        !            59: string(%d) "%d"
        !            60: string(2) "31"
        !            61: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>