Annotation of embedaddon/php/ext/date/tests/strftime_basic.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test strftime() function : basic functionality 
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : string strftime(string format [, int timestamp])
                      6:  * Description: Format a local time/date according to locale settings 
                      7:  * Source code: ext/date/php_date.c
                      8:  * Alias to functions: 
                      9:  */
                     10: 
                     11: echo "*** Testing strftime() : basic functionality ***\n";
                     12: 
                     13: date_default_timezone_set("Asia/Calcutta");
                     14: // Initialise all required variables
                     15: $format = '%b %d %Y %H:%M:%S';
                     16: $timestamp = mktime(8, 8, 8, 8, 8, 2008);
                     17: 
                     18: // Calling strftime() with all possible arguments
                     19: var_dump( strftime($format, $timestamp) );
                     20: 
                     21: // Calling strftime() with mandatory arguments
                     22: var_dump( strftime($format) );
                     23: 
                     24: ?>
                     25: ===DONE===
                     26: --EXPECTF--
                     27: *** Testing strftime() : basic functionality ***
                     28: string(20) "Aug 08 2008 08:08:08"
                     29: string(%d) "%s %d %d %d:%d:%d"
                     30: ===DONE===

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