Skip to content
Advertisement

Tag: date-conversion

Subtracting days from a future date

It is working as expected. $newdate prints as 1 December 2022 However, if the $tour_date is not the current year, it does not work properly. It is still printing as 1 December 2022. The $newdate prints as 1 December 2022. But it should be 1 December 2023 which is -10 days from 11 December 2023. Any idea, that will work

new DateTime is not working properly with the future date

I am trying to calculate the differences between 2 dates. The first date is the reservation date, and the second date is the traveler’s birthdate. Format of the $tour_day is 15 December, 202X It works if the reservation date is the current year. However if the reservation date is 2022 or more, than it cannot calculate correctly because is always

Advertisement