You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Text can be quoted using single quotes (') to avoid interpretation.
....
....
Date and Time Pattern
Result
"yyyy.MM.dd G 'at' HH:mm:ss z"
2001.07.04 AD at 12:08:56 PDT
Or this exact date time pattern will not give the same result as instead of having the literal at, it will be converted to pmt because of dateFormat = strings.Replace(dateFormat, "a", "pm", 1) (source)
I also noticed while writing this issue that it's impossible to have uppercase PM in the output as the code replace a first and then look for aa in the format pattern (source):
Hey,
I noticed the DateFormatToLayout doesn't fully support the java RFC as stated in the code documentation.
The java RFC says:
Or this exact date time pattern will not give the same result as instead of having the literal
at
, it will be converted topmt
because ofdateFormat = strings.Replace(dateFormat, "a", "pm", 1)
(source)I also noticed while writing this issue that it's impossible to have uppercase
PM
in the output as the code replacea
first and then look foraa
in the format pattern (source):The
G
pattern is also not supported (thanks to @fridgepoet to have noticed it)The text was updated successfully, but these errors were encountered: