note 59819 deleted from function.strftime by nlopess
| From: | nlopess@php.net | Date: | Fri, 16 Dec 2005 15:06:26 +0000 |
| Subject: | note 59819 deleted from function.strftime by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-100310@lists.php.net to get a copy of this message | ||
Note Submitter: father at bigattichouse dot com
----
I built a calendar that worked beautifully on linux for several years, and it would always start the
first day of the month as 0 on windows.
This works on linux, fails on windows:
$dstart=strftime("%u",strtotime("$year-$mun-01"));
I got the following working on the windows machine:
(after looking here in the notes)
$firstday_ts = mktime(1,0,0,$mun,1,$year);
$dstart = date("w", $firstday_ts);
Thought I'd share.