Php > Date Time sample source codes
For all of us who live in places that change between daylight-savings
For all of us who live in places that change between daylight-savings and standard time. Returns 1 if given time is in daylight savings 0 otherwise 4 && $month < 10) { $retval = 1; # May thru September } elseif ($month == 4 && $dom > 7) { $retval = 1; # After first week in April } elseif ($month == 4 && $dom <= 7 && $dow == 0 && $hour >= 2) { $retval = 1; # After 2am on first Sunday ($dow=0) in April } elseif ($month == 4 && $dom <= 7 && $dow != 0 && ($dom-$dow > 0)) { $retval = 1; # After Sunday of first week in April } elseif ($month == 10 && $dom < 25) { $retval = 1; # Before last week of October } elseif ($month == 10 && $dom >= 25 && $dow == 0 && $hour < 2) { $retval = 1; # Before 2am on last Sunday in October } elseif ($month == 10 && $dom >= 25 && $dow != 0 && ($dom-24-$dow < 1) ) { $retval = 1; # Before Sunday of last week in October } else { $retval = 0; } return($retval); ?>
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage