problem with dates


#1

[php]

echo date(“Y-m-d”, strtotime(“next year”, mktime($domain_data)));
$domain_data= $_SESSION[‘renew_domain’];
$_SESSION[‘renew_domain’]= date from database ( 2018.06.22)
[/php]

my output is 2019.06. 13 - for some reason the day is changed to 13( all of the dates). Its always 13
Any ideas?


#2

What is the value of $domain_data


#3

[php]$domain_date = DateTime::createFromFormat(‘Y-m-d’, $domain_data);
$expires = $domain_date->modify(’+1 year’);
echo $expires->format(‘Y-m-d’);[/php]


#4

Thank you dude its working fine. I allready find other solution before you respond, but I will keep in my notes. Thank you for your respond