|
19 | 19 | // similar to joda DateTimeFormat. The pattern syntax supported is a subset
|
20 | 20 | // (mostly compatible) with joda DateTimeFormat.
|
21 | 21 | //
|
22 |
| -// |
23 |
| -// Symbol Meaning Type Supported Examples |
24 |
| -// ------ ------- ------- --------- ------- |
25 |
| -// G era text no AD |
26 |
| -// C century of era (>=0) number no 20 |
27 |
| -// Y year of era (>=0) year yes 1996 |
28 |
| -// |
29 |
| -// x weekyear year yes 1996 |
30 |
| -// w week of weekyear number yes 27 |
31 |
| -// e day of week number yes 2 |
32 |
| -// E day of week text yes Tuesday; Tue |
33 |
| -// |
34 |
| -// y year year yes 1996 |
35 |
| -// D day of year number yes 189 |
36 |
| -// M month of year month yes July; Jul; 07 |
37 |
| -// d day of month number yes 10 |
38 |
| -// |
39 |
| -// a halfday of day text yes PM |
40 |
| -// K hour of halfday (0~11) number yes 0 |
41 |
| -// h clockhour of halfday (1~12) number yes 12 |
42 |
| -// |
43 |
| -// H hour of day (0~23) number yes 0 |
44 |
| -// k clockhour of day (1~24) number yes 24 |
45 |
| -// m minute of hour number yes 30 |
46 |
| -// s second of minute number yes 55 |
47 |
| -// S fraction of second nanoseconds yes 978000 |
48 |
| -// f fraction of seconds nanoseconds yes 123456789 |
49 |
| -// multiple of 3 |
50 |
| -// z time zone text no Pacific Standard Time; PST |
51 |
| -// Z time zone offset/id zone no -0800; -08:00; America/Los_Angeles |
52 |
| -// |
53 |
| -// ' escape for text delimiter |
54 |
| -// '' single quote literal |
| 22 | +// Symbol Meaning Type Supported Examples |
| 23 | +// ------ ------- ------- --------- ------- |
| 24 | +// G era text no AD |
| 25 | +// C century of era (>=0) number no 20 |
| 26 | +// Y year of era (>=0) year yes 1996 |
| 27 | +// |
| 28 | +// x weekyear year yes 1996 |
| 29 | +// w week of weekyear number yes 27 |
| 30 | +// e day of week number yes 2 |
| 31 | +// E day of week text yes Tuesday; Tue |
| 32 | +// |
| 33 | +// y year year yes 1996 |
| 34 | +// D day of year number yes 189 |
| 35 | +// M month of year month yes July; Jul; 07 |
| 36 | +// d day of month number yes 10 |
| 37 | +// |
| 38 | +// a halfday of day text yes PM |
| 39 | +// K hour of halfday (0~11) number yes 0 |
| 40 | +// h clockhour of halfday (1~12) number yes 12 |
| 41 | +// |
| 42 | +// H hour of day (0~23) number yes 0 |
| 43 | +// k clockhour of day (1~24) number yes 24 |
| 44 | +// m minute of hour number yes 30 |
| 45 | +// s second of minute number yes 55 |
| 46 | +// S fraction of second nanoseconds yes 978000 |
| 47 | +// f fraction of seconds nanoseconds yes 123456789 |
| 48 | +// multiple of 3 |
| 49 | +// z time zone text no Pacific Standard Time; PST |
| 50 | +// Z time zone offset/id zone no -0800; -08:00; America/Los_Angeles |
| 51 | +// |
| 52 | +// ' escape for text delimiter |
| 53 | +// '' single quote literal |
55 | 54 | //
|
56 | 55 | // The format is based on pattern letter count. Any character not in the range
|
57 | 56 | // [a-z][A-Z] is interpreted as literal and copied into final string as is.
|
58 | 57 | // Arbitrary Literals can also be written using single quotes `'`
|
59 | 58 | //
|
60 |
| -// Types: Notes: |
61 |
| -// ------ ------ |
62 |
| -// text Use full form if number of letters is >= 4. |
63 |
| -// Otherwise a short form is used (if available). |
64 |
| -// |
65 |
| -// number Minimum number of digits depends on number of letters. |
66 |
| -// Shorter numbers are zero-padded. |
| 59 | +// Types: Notes: |
| 60 | +// ------ ------ |
| 61 | +// text Use full form if number of letters is >= 4. |
| 62 | +// Otherwise a short form is used (if available). |
67 | 63 | //
|
68 |
| -// year mostly like number. If Pattern length is 2, |
69 |
| -// the year will be displayed as zero-based year |
70 |
| -// of the century (modulo 100) |
| 64 | +// number Minimum number of digits depends on number of letters. |
| 65 | +// Shorter numbers are zero-padded. |
71 | 66 | //
|
72 |
| -// month If pattern length >= 3, formatting is according to |
73 |
| -// text type. Otherwise number type |
74 |
| -// formatting rules are applied. |
| 67 | +// year mostly like number. If Pattern length is 2, |
| 68 | +// the year will be displayed as zero-based year |
| 69 | +// of the century (modulo 100) |
75 | 70 | //
|
76 |
| -// millis Not yet supported |
| 71 | +// month If pattern length >= 3, formatting is according to |
| 72 | +// text type. Otherwise number type |
| 73 | +// formatting rules are applied. |
77 | 74 | //
|
78 |
| -// zone Not yet supported |
| 75 | +// millis Not yet supported |
79 | 76 | //
|
80 |
| -// literal Literals are copied as is into formatted string |
| 77 | +// zone Not yet supported |
81 | 78 | //
|
| 79 | +// literal Literals are copied as is into formatted string |
82 | 80 | package dtfmt
|
0 commit comments