Date string

6 views
Skip to first unread message

Elise Springer

unread,
Jul 27, 2005, 7:15:35 PM7/27/05
to Tiddl...@googlegroups.com, Elise Springer
Jeremy (or anyone who knows),

Thanks for making the date string customizable... Sorry to have to
ask, but how does one *use* this new date string option?

The revisions list for 1.2.28 claims:
* Added new method 'formatString' to Date() used for
o the newJournal macro
o formatting dates in the timeline tab
o formatting translateable messages

I can figure out that the idea is to specify the string in various
ways using things like MMMDDYY... but what is the "method" with which
to enter my preference?

Thanks,

-E

AlanH

unread,
Jul 27, 2005, 9:13:31 PM7/27/05
to Tiddl...@googlegroups.com
Anytime you want to format a date from within macro or extenstion code,
you use the syntax:
dateVariable.formatString(formattingText);

for example to get today's date in a unique format, you would use
(shown in two steps only to help understanding):
var today = new Date(); //gets the current date
today = today.formatString("DD MMM YYYY"); //formats the date as "27
July 2005"

Make sense?
~AlanH

Reply all
Reply to author
Forward
0 new messages