say i am on friday or saturday
and i want to find the closest sunday or last fridat date's
how can i do it?
thnaks in advance
peleg
finding the nearest date()
Moderator: General Moderators
- pelegk2
- Forum Regular
- Posts: 633
- Joined: Thu Nov 27, 2003 5:02 am
- Location: Israel - the best place to live in after heaven
- Contact:
first thanks
second i tried to find :

now maybe another place to look for then the given link in the manual?
third : for example here it now friday and i did :
and instead of reciving 16/1/2005 i recived 23/1/2005
why is that?
thnaks in advance
peleg
and the given link isnt workinghave a look at the GNU manual page titled Date Input Formats.
now maybe another place to look for then the given link in the manual?
third : for example here it now friday and i did :
Code: Select all
strtotime ("near Sunday")why is that?
thnaks in advance
peleg
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
<?php
echo date('Y-m-d', strtotime('-1 week last thursday')) . "\n";
echo date('Y-m-d', strtotime('next sunday')) . "\n";
echo date('Y-m-d', strtotime('this sunday')) . "\n";
?>Code: Select all
2005-01-06
2005-01-23
2005-01-16- pelegk2
- Forum Regular
- Posts: 633
- Joined: Thu Nov 27, 2003 5:02 am
- Location: Israel - the best place to live in after heaven
- Contact:
first thnaks alot
second where can i find : the
"Date Input Formats"?
thnaks in advance
peleg
"Date Input Formats"?
thnaks in advance
peleg