Loading...
X

php date

Wikis > php date
<? Php
// Hvordan få dagen tre dager fra nå:
$ I dag = date ( "j" );
$ ThisMonth = date ( "n" );
$ Thisyear = date ( "Y" );
echo date ( "F j Y" , mktime (0,0,0, $ thisMonth , $ i dag 3, $ thisyear ));
 
// En uke fra nå:
liste ( $ i dag , $ thisMonth , $ thisyear ) = eksplodere ( "" , dato ( "Joh Y" ));
echo date ( "F j Y" , mktime (0,0,0, $ thisMonth , $ dag 7, $ thisyear ));
 
// fire måneder fra nå:
liste ( $ i dag , $ thisMonth , $ thisyear ) = eksplodere ( "" , dato ( "Joh Y" ));
echo date ( "F j Y" , mktime (0,0,0, $ thisMonth 4, $ i dag , $ thisyear ));
 
// 3 år, 2 måneder og 35 dager fra nå:
liste ( $ i dag , $ thisMonth , $ thisyear ) = eksplodere ( "" , dato ( "Joh Y" ));
echo date ( "F j Y" , mktime (0,0,0, $ thisMonth 2, $ i dag 35, $ thisyear +3));
?>

Siste innlegg

Siste kommentarer

Arkiv

Fram og tilbake

april 2025
M T O T F L S
 123456
78910111213
14151617181920
21222324252627
282930