Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged date



1 2 3 4 5 Next »
Forms a php timestamp out of an date string i.e. create_timestamp(24.12.2007);
0 240 posted 13 years ago by razel
The code below will format 2008-01-30 10:58:32 to Jan 30, 2008 See the page http://us2.php.net/date for a complete list of formatting codes.
2 510 posted 13 years ago by meme
A simple but usefull smarty plugin to convert a unix timestamp to any date format. Usage: {$var|convertunix:"d-m-Y"}
2 498 posted 14 years ago by FrankBr
Taken from : http://www.phpfreechat.net/forum/viewtopic.php?pid=7587 See also this class : http://www.phpbuilder.com/snippet/download.php?type=snippet&id=2205
1 273 posted 14 years ago by clapfouine
Easiest way to get the last day in the current month.
2 426 posted 14 years ago by alli14404
0 717 posted 14 years ago by nicolaspar
Convert 12hs format to 24hs format. In example: 10:00:00 a.m. return timestamp for 22:00. Or use: strtotime('1970-01-01 '.$hora);
1 326 posted 14 years ago by nicolaspar
echo validarFecha( '1-1-1998', 0 ) ? 'ok' : 'ko' ; #ok echo validarFecha( '1-1-1998' ) ? 'ok' : 'ko' ; #ko echo validarFecha( '1980/05/06' ) ? 'ok' : 'ko' ; #ok echo validarFecha( '1700-5-1' ) ? 'ok' : 'ko' ; #ok
0 340 posted 14 years ago by nicolaspar
De aa-mm-dd a dd-mm-aa y al revé
3 394 posted 14 years ago by nicolaspar
The names of the months, as returned by date('M', ...)
1 428 posted 15 years ago by collin
2 482 posted 15 years ago by gdonald
0 305 posted 15 years ago by olive
1 2 3 4 5 Next »