strftime_variation17.phpt 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. Test strftime() function : usage variation - Checking day related formats which are not supported on Windows.
  3. --SKIPIF--
  4. <?php
  5. if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
  6. die("skip Test is valid for Windows");
  7. }
  8. ?>
  9. --FILE--
  10. <?php
  11. /* Prototype : string strftime(string format [, int timestamp])
  12. * Description: Format a local time/date according to locale settings
  13. * Source code: ext/date/php_date.c
  14. * Alias to functions:
  15. */
  16. echo "*** Testing strftime() : usage variation ***\n";
  17. // Initialise function arguments not being substituted (if any)
  18. setlocale(LC_ALL, "en_US");
  19. date_default_timezone_set("Asia/Calcutta");
  20. $timestamp = mktime(8, 8, 8, 8, 8, 2008);
  21. echo "\n-- Testing strftime() function with Day of the month as decimal single digit format --\n";
  22. $format = "%e";
  23. var_dump( strftime($format) );
  24. var_dump( strftime($format, $timestamp) );
  25. ?>
  26. ===DONE===
  27. --EXPECTF--
  28. *** Testing strftime() : usage variation ***
  29. -- Testing strftime() function with Day of the month as decimal single digit format --
  30. bool(false)
  31. bool(false)
  32. ===DONE===