Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Add non-US-format dates to Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add non-US-format dates to Mail
Authored by: ThreeDayMonk on Jun 24, '03 05:53:22PM

It's %H for 24-hour hour, and %1I (the "1" ensures it's at least one digit wide, presumably) for 12-hour, judging by the file, although I haven't tried that. It ought to work. The 12/24-hour setting seems to be one area where it does respect the international settings, by the way.



[ Reply to This | # ]
Add non-US-format dates to Mail
Authored by: kailb on Jun 24, '03 07:15:55PM

I was trying to find the specifier for the leading zero in the 12 hour display. I saw that the regular spcifier was:

/* The format for hours and minutes in 12 hour format */
"12HOUR_TIME_FORMAT" = "%1I:%M";

It looks like the "1" is actually the blank space holder. Because if you remove it and use:

"12HOUR_TIME_FORMAT" = "%I:%M";

you will get a leading zero where the blank space was.





[ Reply to This | # ]
Add non-US-format dates to Mail
Authored by: kailb on Jun 24, '03 07:35:17PM

So to further add to your specifier list...

Year
%y two digit year (03)
%Y four digit year (2003)

Month
%b short month name (Nov)
%B long month name (November)
%m month number with leading zero

Day
%e day without leading zero (1)
%d day with leading zero (01)

Time
%1H hour (24) without leading zero ( 9:31)
%H hour (24) with leading zero (09:31)

%1I hour (12) without leading zero ( 9:31)
%I hour (12) with leading zero (09:31)



[ Reply to This | # ]
Add non-US-format dates to Mail
Authored by: techren on Jun 25, '03 12:04:10PM

According to the strftime manual:

%I is replaced by the hour (12-hour clock) as a decimal number (01-12).

%l is replaced by the hour (12-hour clock) as a decimal number (1-12); single digits are preceded by a blank.

Seem to work for me; but except for this test, I use the ISO formats. And I like the metric system. :)



[ Reply to This | # ]