Jump to content

Date format program


mysty

Recommended Posts

I may not have explained this very well.  Instead of looking up what specifiers to put for dates, this small program did it for you.  It didn't put it into the PHP code.  For that, you just copied the output into your own code.  For example if I wanted a date output to say Nov 11, 2007 , I would need to put in my code

%b %d, %Y.  So, this little stand alone program would have blanks for you to fill out for Month, Day, Year and you would put Nov in Month, 11 for Day, and 2007 for Year and it would show you %b %d %Y.  I think it even had a place to put dashes or slashes (ie: 11-11-07  or  11/11/07) and it would show you all the specifiers you need to use.

Link to comment
https://forums.phpfreaks.com/topic/79161-date-format-program/#findComment-400695
Share on other sites

Forgive the intrusion, since I don't know the name of the program you are looking for...

 

Programs that do things for you that you should know are a crutch, and make you a lazy programmer.

 

Go to php.net, and thoroughly educate yourself on the date() and mktime() functions. Branch out to strftime() and strtotime(). It isn't brain surgery. It's not really even hard. In most cases, even though behind the scenes you are using Unix timestamps, you never really see them (you have mktime() pass them to date() without even seeing it happen, for example).

 

The bottomline is, too many novice programmers skip the extremely important step of learning time functions, and it comes in handy so many times, over and over again. Take the time to learn this short list of tools, and throw your crutches away...

 

/ end advice

 

PHrEEEk

Link to comment
https://forums.phpfreaks.com/topic/79161-date-format-program/#findComment-401046
Share on other sites

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.