echo Date ("Y-m-d h:i:s", mktime (0, 0, 0,date ("M"), Date ("D")-date ("W") +1-7,date ("Y")), "<br/>"; echo Date ("Y-m-d h:i:s", Mktime (23,59,59,date ("M"), Date ("D")-date ("W") +7-7,date ("Y")), "<br/>"; echo "<br> this week:<br>"; echo Date ("Y-m-d h:i:s", mktime (0, 0, 0,date ("M"), Date ("D")-date ("W") +1,date ("Y")), "<br/>"; echo Date ("Y-m-d h:i:s", Mktime (23,59,59,date ("M"), Date ("D")-date ("W") +7,date ("Y")), "<br/>"; echo "<br> last month:<br>"; echo Date ("Y-m-d h:i:s", mktime (0, 0, 0,date ("M") -1,1,date ("Y")), "<br/>"; echo Date ("Y-m-d h:i:s", Mktime (23,59,59,date ("M"), 0,date ("Y")), "<br/>"; echo "<br> this month:<br>"; echo Date ("Y-m-d h:i:s", mktime (0, 0, 0,date ("M"), 1,date ("Y")), "<br/>"; echo Date ("Y-m-d h:i:s", Mktime (23,59,59,date ("M"), Date ("T"), Date ("Y")), "<br/>"; $getMonthDays = Date ("T", mktime (0, 0, 0,date ("n") + (date ("n")-1)%3,1,date ("Y")); echo "<br> this quarter:<br>"; echo Date (' y-m-d h:i:s ', mktime (0, 0, 0,date (' n ')-(date (' n ')-1)%3,1,date (' Y ')), "<br/>"; echo Date (' y-m-d h:i:s ', Mktime (23,59,59,date (' n ') + (date (' n ')-1)%3, $getMonthDays, date (' Y ')), "<br/>"; $jdtoday = GREGORIANTOJD (Date (' n '), date (' J '), date (' Y ')); $offset = Jddayofweek ($jdtoday)-1; For ($i =0-$offset; $i <7-$offset; $i + +) { $date = Strtotime ($i. ' Days '); Echo (' <th> '. Date (' D ', $date). " /'. Date (' N-j ', $date). ' </th> '); } ?> |