L10n, Date.format and strftime

handgestrickt wanted to show formatted dates to the users of our AJAX-application. in PHP we use the handy function strftime() for this task, but in JavaScript you have to fiddle with the Date-object, which is not really practical. we searched the internet for some already prepared solution and tried several ones. the Date.format()- and strftime()-methods written by Dao Gottwald did the best job in our opinions. the usage is very easy. you take a given UNIX-timestamp, for example from MySQL or PHP and pass it to strftime() together with your format-string.

related:
Date.format()
strftime()
JavaScript
PHP
MySQL

Saturday, 07. April 2007 • trackback url

Add Comment

( to reply to a comment, click the reply link next to the comment )

Comment Title:
Your Name:
Email Address:
Make Public?
Website:
Make Public?

Comment:


Allowed XHTML tags : a, b, i, strong, code, acrynom, blockquote, abbr. Linebreaks will be converted automatically.


Captcha:

captcha image

please type the content of the above image into the following form-field: