Jump to content

displaying date in 8 different formats?


xcoderx

Recommended Posts

something like this i meant

 


echo "Todays date: ".date('d.m.Y');
echo "<br/>Todays Is date: ".date('dM/D/y');
echo "<br/>Todays date: ".date('F-Dd-Y');

 

display it in 8 different ways, anymore help? i managed 3 different formats and 5 more left

something like this i meant

 


echo "Todays date: ".date('d.m.Y');
echo "<br/>Todays Is date: ".date('dM/D/y');
echo "<br/>Todays date: ".date('F-Dd-Y');

 

display it in 8 different ways, anymore help? i managed 3 different formats and 5 more left

 

Did you test out those "formats"? The last two aren't formats that I have ever seen used. You would get something like:

16Feb/Tue/2010 or February-Tue16-2010

 

I *think* your instructor is wanting you to find eight formats that would be legitimately used. Think about how dates are used by people (in different countries) and by machines. Or, be lazy, and do a simple google seach for "date format".

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.