|
|
|
อยากได้ coed first day of week php .ใครพอมีบ้างครับ |
|
|
|
|
|
|
|
Code (PHP)
function firstDayofWeek($week,$year) {
$timestamp = mktime(0, 0, 0, 1, 1, $year);
if( $week == 1 ) {
while ( date("W",$timestamp) < 2 ) {
$timestamp += (60*60*24);
}
$timestamp -= (60*60*24*8);
}
else {
while ( date("W",$timestamp) < $week ) {
$timestamp += (60*60*24);
}
$timestamp -= (60*60*24);
}
return $timestamp;
}
|
|
|
|
|
Date :
2011-05-20 09:07:11 |
By :
gr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|