Re: [PHP] Strtotime returns 02/09/2008 for "next Saturday"....



Mike Morton schreef:
Good point ;)

Except that generally, when am told "next Saturday" - I take that to mean
"the next Saturday" - just one more ambiguity in the english language that
makes it so hard to learn I suppose!

The odd thing about this whole situation it that it seems to have cropped up
just after we "upgraded" to 4.3.9 - prior to that, "next Saturday" worked
just peachy. I wish I knew which version we were running before that - but
that record was not kept.

I guess we are stuck with this, what maybe is a problem with this version,
until the Redhat RPM gets higher than 4.3.9 - since that is what our server
manager uses for updates....

I could always adjust it to be:

date("m/d/Y",strtotime("+ ".(6-date("w"))." days"));

That should always return the next Saturday of the week, and if I am correct
in my thinking, then even on the Saturday, 6-6 = 0 - which would return that
day... Which does, at least for my application of it, work.

so your actually saying 'find the closest saturday, in the future, from today'.
because if it was saturday, and you said to me "see you next saterday" I'd expect
to see you in 7 days time.


.



Relevant Pages

  • Re: MERGE as the imperative form of aggregation
    ... Assume the below executes on a client machine, ... and the relvar T is on a distinct server machine. ... Introducing context sensitivities into expression evaluation rules ... ambiguity in view updates. ...
    (comp.databases.theory)
  • Re: sending email with form input...
    ... Ambiguity has a certain quality to it. ... > The link he supplied to the FP 2000 server extensions and the FP 2000 SERK ... > Microsoft MVP - FrontPage ...
    (microsoft.public.frontpage.programming)
  • Re: sending email with form input...
    ... Email requires a web server to work. ... Ambiguity has a certain quality to it. ... >> Microsoft MVP - FrontPage ...
    (microsoft.public.frontpage.programming)
  • Re: Whats this called?
    ... There isn't any ambiguity there. ... Let's not start playing with words: Rabin is commonly said to be ... four roots you should calculate and decode. ... >> The better performance on the server side the less risk it will choke ...
    (sci.crypt)