Menu

#1 DateTime format string error for 't' and 'tt' options

open
nobody
None
5
2010-04-13
2010-04-13
Anonymous
No

When applying a format string with the 't' or 'tt' option times such as 12:30PM will yield A or AM.

data["tt"] = (hour > 12 ? DateTime.strings.PM : DateTime.strings.AM) ;
data["t"] = (hour > 12 ? DateTime.strings.P : DateTime.strings.A);

The > should be changed to a >= for correct behavior.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.