datetimeformatter: DateTimeFormatter cheat sheet module (pattern letters incl. the four hour letters, yyyy vs YYYY week-year bug and WeekFields, en_IN locales and the U+202F AM/PM trap with parseLenient fix, SMART/STRICT/LENIENT parsing, ISO constants, SimpleDateFormat thread safety), 18 contract tests
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b3fvyFpxThdRxcozLx
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
moment = 2026-11-14T01:17:05.123456789+05:30[Asia/Kolkata] (a Saturday, day 318 of the year)
|
||||
|
||||
yyyy -> 2026
|
||||
yy -> 26
|
||||
uuuu -> 2026
|
||||
M -> 11
|
||||
MM -> 11
|
||||
MMM -> Nov
|
||||
MMMM -> November
|
||||
MMMMM -> N
|
||||
d -> 14
|
||||
dd -> 14
|
||||
D -> 318
|
||||
DDD -> 318
|
||||
E -> Sat
|
||||
EEEE -> Saturday
|
||||
EEEEE -> S
|
||||
e -> 7
|
||||
ee -> 07
|
||||
H -> 1
|
||||
HH -> 01
|
||||
h -> 1
|
||||
hh -> 01
|
||||
k -> 1
|
||||
K -> 1
|
||||
a -> AM
|
||||
B -> in the morning
|
||||
BBBB -> in the morning
|
||||
m -> 17
|
||||
mm -> 17
|
||||
s -> 5
|
||||
ss -> 05
|
||||
S -> 1
|
||||
SSS -> 123
|
||||
SSSSSS -> 123456
|
||||
n -> 123456789
|
||||
A -> 4625123
|
||||
G -> AD
|
||||
Q -> 4
|
||||
QQQ -> Q4
|
||||
w -> 46
|
||||
W -> 2
|
||||
z -> IST
|
||||
zzzz -> India Standard Time
|
||||
VV -> Asia/Kolkata
|
||||
O -> GMT+5:30
|
||||
OOOO -> GMT+05:30
|
||||
X -> +0530
|
||||
XXX -> +05:30
|
||||
x -> +0530
|
||||
xxx -> +05:30
|
||||
Z -> +0530
|
||||
ZZZZ -> GMT+05:30
|
||||
ZZZZZ -> +05:30
|
||||
|
||||
== the four hour letters, at midnight, 01:00, noon and 13:00 ==
|
||||
time H h k K
|
||||
00:17 0 12 24 0
|
||||
01:17 1 1 1 1
|
||||
12:17 12 12 12 0
|
||||
13:17 13 1 13 1
|
||||
Reference in New Issue
Block a user