mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib/time: format table for custom_format()
(#17428)
* vlib/time: format table for `custom_format()` * small fix * small fix
This commit is contained in:
parent
607649b44d
commit
864e1994b0
@ -93,49 +93,49 @@ const (
|
|||||||
|
|
||||||
// custom_format returns a date with custom format
|
// custom_format returns a date with custom format
|
||||||
//
|
//
|
||||||
// | | Token | Output |
|
// | | Token | Output |
|
||||||
// | ----------: | :------ | :--------- |
|
// |-----------------:|:------|:---------------------------------------|
|
||||||
// | **Month** | M | 1 2 ... 11 12 |
|
// | **Month** | M | 1 2 ... 11 12 |
|
||||||
// | | Mo | 1st 2nd ... 11th 12th |
|
// | | Mo | 1st 2nd ... 11th 12th |
|
||||||
// | | MM | 01 02 ... 11 12 |
|
// | | MM | 01 02 ... 11 12 |
|
||||||
// | | MMM | Jan Feb ... Nov Dec |
|
// | | MMM | Jan Feb ... Nov Dec |
|
||||||
// | | MMMM | January February ... November December |
|
// | | MMMM | January February ... November December |
|
||||||
// | **Quarter** | Q | 1 2 3 4 |
|
// | **Quarter** | Q | 1 2 3 4 |
|
||||||
// | | QQ | 01 02 03 04 |
|
// | | QQ | 01 02 03 04 |
|
||||||
// | | Qo | 1st 2nd 3rd 4th |
|
// | | Qo | 1st 2nd 3rd 4th |
|
||||||
// | **Day of Month** | D | 1 2 ... 30 31 |
|
// | **Day of Month** | D | 1 2 ... 30 31 |
|
||||||
// | | Do | 1st 2nd ... 30th 31st |
|
// | | Do | 1st 2nd ... 30th 31st |
|
||||||
// | | DD | 01 02 ... 30 31 |
|
// | | DD | 01 02 ... 30 31 |
|
||||||
// | **Day of Year** | DDD | 1 2 ... 364 365 |
|
// | **Day of Year** | DDD | 1 2 ... 364 365 |
|
||||||
// | | DDDo | 1st 2nd ... 364th 365th |
|
// | | DDDo | 1st 2nd ... 364th 365th |
|
||||||
// | | DDDD | 001 002 ... 364 365 |
|
// | | DDDD | 001 002 ... 364 365 |
|
||||||
// | **Day of Week** | d | 0 1 ... 5 6 (Sun-Sat) |
|
// | **Day of Week** | d | 0 1 ... 5 6 (Sun-Sat) |
|
||||||
// | | c | 1 2 ... 6 7 (Mon-Sun) |
|
// | | c | 1 2 ... 6 7 (Mon-Sun) |
|
||||||
// | | dd | Su Mo ... Fr Sa |
|
// | | dd | Su Mo ... Fr Sa |
|
||||||
// | | ddd | Sun Mon ... Fri Sat |
|
// | | ddd | Sun Mon ... Fri Sat |
|
||||||
// | | dddd | Sunday Monday ... Friday Saturday |
|
// | | dddd | Sunday Monday ... Friday Saturday |
|
||||||
// | **Week of Year** | w | 1 2 ... 52 53 |
|
// | **Week of Year** | w | 1 2 ... 52 53 |
|
||||||
// | | wo | 1st 2nd ... 52nd 53rd |
|
// | | wo | 1st 2nd ... 52nd 53rd |
|
||||||
// | | ww | 01 02 ... 52 53 |
|
// | | ww | 01 02 ... 52 53 |
|
||||||
// | **Year** | YY | 70 71 ... 29 30 |
|
// | **Year** | YY | 70 71 ... 29 30 |
|
||||||
// | | YYYY | 1970 1971 ... 2029 2030 |
|
// | | YYYY | 1970 1971 ... 2029 2030 |
|
||||||
// | **Era** | N | BC AD |
|
// | **Era** | N | BC AD |
|
||||||
// | | NN | Before Christ, Anno Domini |
|
// | | NN | Before Christ, Anno Domini |
|
||||||
// | **AM/PM** | A | AM PM |
|
// | **AM/PM** | A | AM PM |
|
||||||
// | | a | am pm |
|
// | | a | am pm |
|
||||||
// | **Hour** | H | 0 1 ... 22 23 |
|
// | **Hour** | H | 0 1 ... 22 23 |
|
||||||
// | | HH | 00 01 ... 22 23 |
|
// | | HH | 00 01 ... 22 23 |
|
||||||
// | | h | 1 2 ... 11 12 |
|
// | | h | 1 2 ... 11 12 |
|
||||||
// | | hh | 01 02 ... 11 12 |
|
// | | hh | 01 02 ... 11 12 |
|
||||||
// | | k | 1 2 ... 23 24 |
|
// | | k | 1 2 ... 23 24 |
|
||||||
// | | kk | 01 02 ... 23 24 |
|
// | | kk | 01 02 ... 23 24 |
|
||||||
// | **Minute** | m | 0 1 ... 58 59 |
|
// | **Minute** | m | 0 1 ... 58 59 |
|
||||||
// | | mm | 00 01 ... 58 59 |
|
// | | mm | 00 01 ... 58 59 |
|
||||||
// | **Second** | s | 0 1 ... 58 59 |
|
// | **Second** | s | 0 1 ... 58 59 |
|
||||||
// | | ss | 00 01 ... 58 59 |
|
// | | ss | 00 01 ... 58 59 |
|
||||||
// | **Offset** | Z | -7 -6 ... +5 +6 |
|
// | **Offset** | Z | -7 -6 ... +5 +6 |
|
||||||
// | | ZZ | -0700 -0600 ... +0500 +0600 |
|
// | | ZZ | -0700 -0600 ... +0500 +0600 |
|
||||||
// | | ZZZ | -07:00 -06:00 ... +05:00 +06:00 |
|
// | | ZZZ | -07:00 -06:00 ... +05:00 +06:00 |
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// ```v
|
// ```v
|
||||||
|
Loading…
Reference in New Issue
Block a user