Jump to content

Rohit265

New Members
  • Posts

    1
  • Joined

  • Last visited

Rohit265's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, How can I get number of days remaining to a date, which does not add year, For ex, In this code, I will have to change the year (2022) once Christmas date passes, but I do not want to change the year every time. $futureDate = '2022-12-25'; $d = new DateTime($futureDate); echo $d->diff(new DateTime())->format('%a'); //--> 321 printf("\n");
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.