Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function nextDate($date){
- $dateObj = new DateTime($date);
- $today = new DateTime();
- if($dateObj->format('Ymd') > $today->format('Ymd')){
- return $dateObj;
- }
- return $dateObj->modify('+ 1 year');
- }
Add Comment
Please, Sign In to add comment