Reply to Re: This Monday problem

Your name:

Reply:


Posted by Adam on 03/22/07 14:33

On Thu, 22 Mar 2007 09:14:21 -0500, Steve wrote:

>
>"Adam" <anon@nowhere.com> wrote in message
>news:a73503hnqjh4bno4b362cnnf8gpbo3fv3k@4ax.com...
>| On Thu, 22 Mar 2007 13:46:59 +0000, Geoff Berrow wrote:
>|
>| >Message-ID: <bg1503p2n63lufgnaf9cpu9mr6pko0q1ob@4ax.com> from Adam
>| >contained the following:
>| >
>| >>
>| >>I need to be able to return the corresponding dates for Mondays - and
>| >>have tried various functions, scripts with varying degrees of success.
>| >>date('d-M-Y', strtotime('this monday'));
>| >>
>| >>... works, as does:
>| >>
>| >>date('d-M-Y', strtotime('last monday'));
>| >>
>| >>However, whilst this function works well most of the time, for some
>| >>reason it pukes on Monday 19th March - and always returns 18th Mar
>| >>(which is a Sunday!).
>| >
>| >Spring forward, fall back?
>|
>| Errmm ... you'll have to explain that one to me <!!!> I'm from the UK
>| - now in NZ. Is that a US term for some sort of daylight saving thing?
>
>it's a locale saying to help remember that when the time change occurs, we
>know which direction to move the time...in the spring, move the time forward
>one hour...in the fall, move it back one hour. hence, spring forward, fall
>back.
>
>it probably is related to this. however, i'd expect to see it be problematic
>to more than just monday, 19 mar 2007. (and this year's time change was 11
>mar).
>
>btw, i never got why we continue to need/use dst. wasn't it originally an
>agrarian function?

I thought it was so schoolkids got an extra hour of daylight at the
end of the day - so they don't get knocked down by tired drivers.
Presumably, they're OK in dark mornings as drivers are rested and more
alert (not me - I don't do mornings!!!). But I digress ;-)

BTW - try it. Set your PC clock (or test server if you can) back to
around 18th Mar (trya few days before or after) and see what

date('d-M-Y', strtotime('this monday'));

gives you.

Adam.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация