I have a list of items I'm displaying on screen. The HTML template for each item looks like this:
& lt; Div & gt; [Comments] & lt; / Div & gt; & Lt; Small & gt; Posted: [date] & lt; / Small>
[comments]
will be the actual string of text entered by a user. While the [date]
is a JavaScript dated object, I want to display the
Thank you!
Use date method toLocaleFormat (formatString)
var today = new date (); Today.toLocaleFormat ('% d% b% Y'); // 30-Dec-2011
No comments:
Post a Comment