Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for week_php.bat

(view source code of week_php.bat as plain text)

  1. @ECHO OFF
  2. IF "%~1"=="" (
  3. 	PHP.EXE -r "print(idate('W'));"
  4. ) ELSE (
  5. 	ECHO.%*| FINDSTR /R /X /C:"[0-9][0-9]*[/-][0-9][0-9]*[/-][0-9][0-9]*" >NUL
  6. 	IF ERRORLEVEL 1 (
  7. 		ECHO WeekPHP.bat,  Version 1.02
  8. 		ECHO Use PHP to display the ISO week number for the specified date
  9. 		ECHO.
  10. 		ECHO Usage:  WEEKPHP  [ date ]
  11. 		ECHO.
  12. 		ECHO Where:  "date"   is a date in YYYY-MM-DD or the local system's date format
  13. 		ECHO                  ^(default: today^)
  14. 		ECHO.
  15. 		ECHO PHP code by Stan Littlefield
  16. 		ECHO Batch file "wrapper" by Rob van der Woude
  17. 		ECHO http://www.robvanderwoude.com
  18. 		EXIT /B 1
  19. 	) ELSE (
  20. 		PHP.EXE -r "print(idate('W',strtotime('%~1')));"
  21. 	)
  22. )
  23.  

page last modified: 2024-04-16; loaded in 0.0080 seconds