Re: [PHP] getting timestamp for first day of current week

2007-07-07 Thread Olav Mørkrid
what i need is that "monday" means "monday this week", regardless of whether i ask on monday, tuesday, wednesday, thursday, friday, saturday or sunday. the way php works now, i have to something like this: if(date("l") == "monday") $from = date("Y-m-d"); // if today if monday, just give toda

Re: [PHP] getting timestamp for first day of current week

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 22:14 +0200, Olav Mørkrid wrote: > On 03/07/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > If that's ALWAYS the case then it sounds like you have all the > > information you need to get the Monday you want :) > > what do you mean? > > php clearly makes a mistake in gi

Re: [PHP] getting timestamp for first day of current week

2007-07-04 Thread Olav Mørkrid
On 03/07/07, Robert Cummings <[EMAIL PROTECTED]> wrote: If that's ALWAYS the case then it sounds like you have all the information you need to get the Monday you want :) what do you mean? php clearly makes a mistake in giving monday of the current week. -- PHP General Mailing List (http://ww

Re: [PHP] getting timestamp for first day of current week

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 20:19 +0200, Olav Mørkrid wrote: > hello > > how do i get the TIMESTAMP for the FIRST DAY of the CURRENT WEEK (ie. > monday 00:00:00)? > > i tried using strtotime("monday"), but: > > - when i use it on a monday, i get monday THIS WEEK > - when i use it on tuesday thru sunda

[PHP] getting timestamp for first day of current week

2007-07-03 Thread Olav Mørkrid
hello how do i get the TIMESTAMP for the FIRST DAY of the CURRENT WEEK (ie. monday 00:00:00)? i tried using strtotime("monday"), but: - when i use it on a monday, i get monday THIS WEEK - when i use it on tuesday thru sunday, i get monday NEXT WEEK i tried "last monday", "monday this week", "t