Forum Moderators: coopster

Message Too Old, No Replies

Date of the week

         

FiRe

3:38 pm on Apr 23, 2007 (gmt 0)

10+ Year Member



Can anyone help me? I am trying to work out the timestamp for the first DATE (not day) of the current week and last date of the current week. Any ideas?

jatar_k

3:42 pm on Apr 23, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



take a look at the examples here
[php.net...]

FiRe

3:49 pm on Apr 23, 2007 (gmt 0)

10+ Year Member



strtotime("Monday");
strtotime("Friday");

Would it just be that?

[edited by: FiRe at 3:51 pm (utc) on April 23, 2007]

jatar_k

3:52 pm on Apr 23, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



well,

you can figure out the day of the week that it is today

you can figure out how many days until friday and how many days from monday

use an array with the days of the week and figure out a +x days and -y days to figure out your 2 dates

<added after edit>it could be that simple, give it a shot