Jump to content

PHP date calculation

- - - - -

  • Please log in to reply
1 reply to this topic

#1
welton122

welton122

    Learning Programmer

  • Members
  • PipPipPip
  • 76 posts
hi,

okay I am having some trouble with a calculation i need to do. Basically I need to add a year and take 1 month less and day off of the date inputted via the user. So for example if the user entered April 21st 10 then the result from the calculation would be March 22nd 2011.

Does anyone know how I would do this calculation?

Many Thanks,
J

#2
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
  • Location:New York, NY
echo date("F jS y", strtotime("+1 day -1 month +1 year", strtotime("April 21st 2010")));





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users