-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add warning to [ls]dateTimeFormat() to inform about the mask usage #266
Comments
Thanks for pointing this out... do you know off hand if this applies to dateFormat as well? |
I don't think it does, while testing it I originally couldn't reproduce and noticed I was testing dateFormat() instead of dateTimeFormat(). |
Thanks - will be interesting to see if Adobe has an opinion on it how it should work. |
I tested a few of the date functions that take a mask. dateAdd() and datePart() don't see a difference in "y" or "Y". dateFormat() doesn't change with "y" or "Y" but does change with "s" and "S". timeFormat() reads "s" and "S" as the same mask, but sees "d" and "D" different. Though since both of those are only supposed to deal with their respective date parts, I guess I can't complain too much. However, dateTimeFormat() does see differences in "d" and "D", "y" and "Y" (as stated), "h" and "H", and "k" and "K". I haven't dug much further into CF date masking, but I may need to. This may be one of those things that I forgot I knew, but being in SQL land so long, I've gotten used to somewhat sensible date masks. |
Oh, and Lucee can get very odd with date masking. http://trycf.com/gist/0521ba783c8d220bc888/lucee?theme=monokai Didn't Y'Y'Y'Y used to be old pre-MX behavior? |
As discovered by Alexander Kwaschny in https://bugbase.adobe.com/index.cfm?event=bug&id=4105828 uppercase "Y" is different from lowercase "y" the Adobe docs don't mention this explicitly but they do say that the function also follows Java date time mask. Unfortunately they link to a java 6 doc where uppercase "Y" wasn't used yet.
The text was updated successfully, but these errors were encountered: