Actually you can use it just like that
, but if you want it formatted as 30 to April 1, you'll have to use some PHP logic to see if it's a new month.
PHP Code:
$start = mktime(0,0,0,1,30,2012); # will give you the timestamp for that day.
$end = mktime(0,0,0,1,32,2012); # will give you the time stamp for the 1st of feb. PHP does the rollovers for you automatically
So with this, you can use date(), to format it as you like.
To check if it's a new month, you could do something simple like
PHP Code:
if (date('m', $start) != date('m', $end)) { # diff month }
Bookmarks