Jump to content

ISOWeek PHP CLI


stanl

Recommended Posts

I tried

<?php
$isoweek = strftime("%V",strtotime("1/1/2007"));
print($isoweek);
?> 

from the command line, and returns nothing. I read there may be issues with the %V in windows. I added

 

putenv("LC_ALL=de");
setlocale(LC_ALL, "de");

 

to ensure an ISO compatible locale but still nothing. I wish to compare PHP output for ISOWeek with JS, VBS and SQL Server DatePart() as there are reported bugs in the calculations.

 

Am I just going about the PHP wrong?

Link to comment
https://forums.phpfreaks.com/topic/228382-isoweek-php-cli/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.