@ 2014-04-24T06:02:27Z <?php
function add_date($givendate,$day=0,$mth=0,$yr=0) {
$cd = strtotime($givendate);
$newdate = date('Y-m-d h:i:s', mktime(date('h',$cd),
date('i',$cd), date('s',$cd), date('m',$cd)+$mth,
date('d',$cd)+$day, date('Y',$cd)+$yr));
return $newdate;
}
$current_month_first='01'.'-'.date("m").'-'.date("Y");
$current_month_first_stamp=strtotime($current_month_first);
$kezdonapszam="5";
$kezdonapszam_int= (int) $kezdonapszam;
$kezdonapszam_int=$kezdonapszam_int-1;
print $kezdo_full=add_date($current_month_first, $kezdonapszam_int);
//if (strtotime($kezdo_full)<$current_month_first_stamp)
// {$kezdo_full=add_date($kezdo_full,0,1);}
print date("Y-m-d",$kezdo_full);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 2014-04-05 12:00:00
Fatal error: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in /in/8K5oo:26
Stack trace:
#0 /in/8K5oo(26): date('Y-m-d', '2014-04-05 12:0...')
#1 {main}
thrown in /in/8K5oo on line 26
Process exited with code 255 . Output for 5.1.3 - 5.1.6 , 5.2.0 - 5.2.17 , 5.3.0 - 5.3.29 , 5.4.0 - 5.4.45 , 5.5.0 - 5.5.38 , 5.6.0 - 5.6.40 , 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.31 , 7.4.0 - 7.4.33 2014-04-05 12:00:00
Notice: A non well formed numeric value encountered in /in/8K5oo on line 26
1970-01-01 Output for 7.3.32 - 7.3.33 2014-04-05 12:00:001970-01-01 Output for 5.1.0 - 5.1.2 1970-01-05 01:00:00
Notice: A non well formed numeric value encountered in /in/8K5oo on line 26
1970-01-01 Output for 4.3.0 - 4.3.11 , 4.4.0 - 4.4.9 , 5.0.0 - 5.0.5 2006-10-09 12:00:001970-01-01 preferences:dark mode live preview
348.5 ms | 402 KiB | 460 Q