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
|
||||
//
|
||||
// | | Token | Output |
|
||||
// | ----------: | :------ | :--------- |
|
||||
// | **Month** | M | 1 2 ... 11 12 |
|
||||
// | | Mo | 1st 2nd ... 11th 12th |
|
||||
// | | MM | 01 02 ... 11 12 |
|
||||
// | | MMM | Jan Feb ... Nov Dec |
|
||||
// | | MMMM | January February ... November December |
|
||||
// | **Quarter** | Q | 1 2 3 4 |
|
||||
// | | QQ | 01 02 03 04 |
|
||||
// | | Qo | 1st 2nd 3rd 4th |
|
||||
// | **Day of Month** | D | 1 2 ... 30 31 |
|
||||
// | | Do | 1st 2nd ... 30th 31st |
|
||||
// | | DD | 01 02 ... 30 31 |
|
||||
// | **Day of Year** | DDD | 1 2 ... 364 365 |
|
||||
// | | DDDo | 1st 2nd ... 364th 365th |
|
||||
// | | DDDD | 001 002 ... 364 365 |
|
||||
// | **Day of Week** | d | 0 1 ... 5 6 (Sun-Sat) |
|
||||
// | | c | 1 2 ... 6 7 (Mon-Sun) |
|
||||
// | | dd | Su Mo ... Fr Sa |
|
||||
// | | ddd | Sun Mon ... Fri Sat |
|
||||
// | | dddd | Sunday Monday ... Friday Saturday |
|
||||
// | **Week of Year** | w | 1 2 ... 52 53 |
|
||||
// | | wo | 1st 2nd ... 52nd 53rd |
|
||||
// | | ww | 01 02 ... 52 53 |
|
||||
// | **Year** | YY | 70 71 ... 29 30 |
|
||||
// | | YYYY | 1970 1971 ... 2029 2030 |
|
||||
// | **Era** | N | BC AD |
|
||||
// | | NN | Before Christ, Anno Domini |
|
||||
// | **AM/PM** | A | AM PM |
|
||||
// | | a | am pm |
|
||||
// | **Hour** | H | 0 1 ... 22 23 |
|
||||
// | | HH | 00 01 ... 22 23 |
|
||||
// | | h | 1 2 ... 11 12 |
|
||||
// | | hh | 01 02 ... 11 12 |
|
||||
// | | k | 1 2 ... 23 24 |
|
||||
// | | kk | 01 02 ... 23 24 |
|
||||
// | **Minute** | m | 0 1 ... 58 59 |
|
||||
// | | mm | 00 01 ... 58 59 |
|
||||
// | **Second** | s | 0 1 ... 58 59 |
|
||||
// | | ss | 00 01 ... 58 59 |
|
||||
// | **Offset** | Z | -7 -6 ... +5 +6 |
|
||||
// | | ZZ | -0700 -0600 ... +0500 +0600 |
|
||||
// | | ZZZ | -07:00 -06:00 ... +05:00 +06:00 |
|
||||
// | | Token | Output |
|
||||
// |-----------------:|:------|:---------------------------------------|
|
||||
// | **Month** | M | 1 2 ... 11 12 |
|
||||
// | | Mo | 1st 2nd ... 11th 12th |
|
||||
// | | MM | 01 02 ... 11 12 |
|
||||
// | | MMM | Jan Feb ... Nov Dec |
|
||||
// | | MMMM | January February ... November December |
|
||||
// | **Quarter** | Q | 1 2 3 4 |
|
||||
// | | QQ | 01 02 03 04 |
|
||||
// | | Qo | 1st 2nd 3rd 4th |
|
||||
// | **Day of Month** | D | 1 2 ... 30 31 |
|
||||
// | | Do | 1st 2nd ... 30th 31st |
|
||||
// | | DD | 01 02 ... 30 31 |
|
||||
// | **Day of Year** | DDD | 1 2 ... 364 365 |
|
||||
// | | DDDo | 1st 2nd ... 364th 365th |
|
||||
// | | DDDD | 001 002 ... 364 365 |
|
||||
// | **Day of Week** | d | 0 1 ... 5 6 (Sun-Sat) |
|
||||
// | | c | 1 2 ... 6 7 (Mon-Sun) |
|
||||
// | | dd | Su Mo ... Fr Sa |
|
||||
// | | ddd | Sun Mon ... Fri Sat |
|
||||
// | | dddd | Sunday Monday ... Friday Saturday |
|
||||
// | **Week of Year** | w | 1 2 ... 52 53 |
|
||||
// | | wo | 1st 2nd ... 52nd 53rd |
|
||||
// | | ww | 01 02 ... 52 53 |
|
||||
// | **Year** | YY | 70 71 ... 29 30 |
|
||||
// | | YYYY | 1970 1971 ... 2029 2030 |
|
||||
// | **Era** | N | BC AD |
|
||||
// | | NN | Before Christ, Anno Domini |
|
||||
// | **AM/PM** | A | AM PM |
|
||||
// | | a | am pm |
|
||||
// | **Hour** | H | 0 1 ... 22 23 |
|
||||
// | | HH | 00 01 ... 22 23 |
|
||||
// | | h | 1 2 ... 11 12 |
|
||||
// | | hh | 01 02 ... 11 12 |
|
||||
// | | k | 1 2 ... 23 24 |
|
||||
// | | kk | 01 02 ... 23 24 |
|
||||
// | **Minute** | m | 0 1 ... 58 59 |
|
||||
// | | mm | 00 01 ... 58 59 |
|
||||
// | **Second** | s | 0 1 ... 58 59 |
|
||||
// | | ss | 00 01 ... 58 59 |
|
||||
// | **Offset** | Z | -7 -6 ... +5 +6 |
|
||||
// | | ZZ | -0700 -0600 ... +0500 +0600 |
|
||||
// | | ZZZ | -07:00 -06:00 ... +05:00 +06:00 |
|
||||
//
|
||||
// Usage:
|
||||
// ```v
|
||||
|
Loading…
Reference in New Issue
Block a user