quote:
Originally posted by CookieRevised
quote:
Originally posted by John Anderton
Dont tell me that if you were leaving on the 31st of march and coming back on the 1st of Janmay you would say that ill be back in precisely 1 month and 1 day
You will return in 1 month and 0 days.
Is that really so? What if you left on april 1st... wouldn't that be "1 month and 0 days" to come to the date 'may 1st'?
You cant consider a day back to be the rounded off day ??
Like if you are on march 31st and you have to go 1 month ahead then you "ideally" land up on 31st april which doesnt exist.
So you have 2 possibilities. You can either go with 30th of April or with 1st of may
Well that basically is your dillema isnt it. Jumping from an existing date to a non existant one leads to the need of rounding up of the date (either incrementing or decrementing)
If we decrement it we get 'x' years 'y' months and 1 day.
If we increment it we get 'x' years 'y' months and 0 days.
So my solution is that we increment it based on the simple principle of rounding up of decimals so to speak. Even tho we dont cosider the time in hours to round up, i would rather increment it cause thats what most of us do.
Today ill go and post this question to my friends as well. Ill pm you with the results so you can add them to the poll
I see you need this for that Holiday countdown plugin