date help..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
saranda
Forum Newbie
Posts: 15
Joined: Wed May 10, 2006 6:18 pm

date help..

Post by saranda »

is it posible to get the day of the week from having day month and year

for example ... on this date 25.12.2006 to know what day of the week is .

thnx.
GM
Forum Contributor
Posts: 365
Joined: Wed Apr 26, 2006 4:19 am
Location: Italy

Post by GM »

yup - look at the Date() function, and the parameters it takes to format the output.

You need "D" (gives you Mon, Tue, ... Sun) or "l" (lowercase L) gives you "Monday, Tuesday... Sunday".
User avatar
xpgeek
Forum Contributor
Posts: 146
Joined: Mon May 22, 2006 1:45 am
Location: Kyiv, Ukraine
Contact:

Re: date help..

Post by xpgeek »

saranda wrote:is it posible to get the day of the week from having day month and year

for example ... on this date 25.12.2006 to know what day of the week is .

thnx.

Code: Select all

echo date("l",  strtotime('25.12.2006'));
Post Reply