-
Notifications
You must be signed in to change notification settings - Fork 13
Lowercase meridian indicator #10
Comments
Agreed. We could use tt for am/pm and TT for AM/PM. I'll get this done shortly. |
Thanks! |
Fixed in 0.8.0 (sorry for the delay!) |
Not sure if this matters to anyone else or not, but this breaks compatibility with .NET custom date formatting. http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx .NET doesn't actually have a difference between upper and lower case in the format string. Having said this I'm sure I can work around this. Just wanted to make a note of it. |
Maybe the better way to do this would be a setting for the AM/PM designator. That way tt just refers to the desginator. |
I'm not sure I understand...why would that matter? What does a JavaScript library have to do with .NET? There is (unfortunately) no standard for the tokens in date/time formatting across programming languages and libraries. There are often some similarities for common tokens, as many implementations are initially based off of one another, but they inevitably diverge because a language or library forgot or intentionally chose not to implement some feature, so that token just gets made up on the spot when it is implemented. You shouldn't have to work around anything. You just use the proper tokens for .NET when dealing with .NET date/time formatting, and you use the proper tokens for jquery-localtime when dealing with jquery-localtime. |
I have an MVC project. We have this line that sets the format for jQuery localtime to use: $.localtime.setFormat('@String.Format("{0} {1}", System.Globalization.DateTimeFormatInfo.CurrentInfo.ShortDatePattern, System.Globalization.DateTimeFormatInfo.CurrentInfo.LongTimePattern)'); In en-US, LongTimePattern uses tt which is where my problem is here. That is where my work around comes from. I will have to write a method that can convert from .NET date/time formatting -> jquery-localtime. |
Yes; unfortunately you'll need a conversion method. Ultimately, the server-side could be .NET or Java or Ruby or etc. etc. etc. It's not practical for jQuery localtime to support all of these - they are probably self-contradictory, so you'd need |
I totally get that you wouldn't want to support all those formats. My comment was more of a note to other .NET developers. |
It would be great to be able to get am/pm in lowercase.
The text was updated successfully, but these errors were encountered: