Skip to content

Commit

Permalink
refactor: Add documentation for advancedFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Schaffernak committed Jan 4, 2021
1 parent e91b212 commit c8c0139
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 28 deletions.
27 changes: 15 additions & 12 deletions docs/en/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,21 @@ dayjs().format('Q Do k kk X x')

List of added formats:

| Format | Output | Description |
| ------ | --------------------- | ----------------------------------------------------- |
| `Q` | 1-4 | Quarter |
| `Do` | 1st 2nd ... 31st | Day of Month with ordinal |
| `k` | 1-24 | The hour, beginning at 1 |
| `kk` | 01-24 | The hour, 2-digits, beginning at 1 |
| `X` | 1360013296 | Unix Timestamp in second |
| `x` | 1360013296123 | Unix Timestamp in millisecond |
| `w` | 1 2 ... 52 53 | Week of year (depend: weekOfYear plugin) |
| `ww` | 01 02 ... 52 53 | Week of year, 2-digits (depend: weekOfYear plugin) |
| `wo` | 1st 2nd ... 52nd 53rd | Week of year with ordinal (depend: weekOfYear plugin) |
| `gggg` | 2017 | Week Year (depend: weekYear plugin) |
| Format | Output | Description |
| ------ | --------------------- | --------------------------------------------------------------- |
| `Q` | 1-4 | Quarter |
| `Do` | 1st 2nd ... 31st | Day of Month with ordinal |
| `k` | 1-24 | The hour, beginning at 1 |
| `kk` | 01-24 | The hour, 2-digits, beginning at 1 |
| `X` | 1360013296 | Unix Timestamp in second |
| `x` | 1360013296123 | Unix Timestamp in millisecond |
| `w` | 1 2 ... 52 53 | Week of year (depend: weekOfYear plugin) |
| `ww` | 01 02 ... 52 53 | Week of year, 2-digits (depend: weekOfYear plugin) |
| `W` | 1 2 ... 52 53 | ISO Week of year (depend: weekOfYear & isoWeek plugin) |
| `WW` | 01 02 ... 52 53 | ISO Week of year, 2-digits (depend: weekOfYear & isoWeek plugin)|
| `wo` | 1st 2nd ... 52nd 53rd | Week of year with ordinal (depend: weekOfYear plugin) |
| `gggg` | 2017 | Week Year (depend: weekYear plugin) |
| `GGGG` | 2017 | ISO Week Year (depend: weekYear & isoWeek plugin) |

### LocalizedFormat

Expand Down
11 changes: 7 additions & 4 deletions docs/es-es/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,13 @@ Lista de formatos añadidos:
| `kk` | 01-24 | Hora, con 2 dígitos, contando desde 1 |
| `X` | 1360013296 | Tiempo Unix en segundos |
| `x` | 1360013296123 | Tiempo Unix en milisegundos |
| `w` | 1 2 ... 52 53 | Week of year (depend: weekOfYear plugin) |
| `ww` | 01 02 ... 52 53 | Week of year, 2-digits (depend: weekOfYear plugin) |
| `wo` | 1st 2nd ... 52nd 53rd | Week of year with ordinal (depend: weekOfYear plugin) |
| `gggg` | 2017 | Week Year (depend: weekYear plugin) |
| `w` | 1 2 ... 52 53 | Week of year (depend: weekOfYear plugin) |
| `ww` | 01 02 ... 52 53 | Week of year, 2-digits (depend: weekOfYear plugin) |
| `W` | 1 2 ... 52 53 | ISO Week of year (depend: weekOfYear & isoWeek plugin) |
| `WW` | 01 02 ... 52 53 | ISO Week of year, 2-digits (depend: weekOfYear & isoWeek plugin)|
| `wo` | 1st 2nd ... 52nd 53rd | Week of year with ordinal (depend: weekOfYear plugin) |
| `gggg` | 2017 | Week Year (depend: weekYear plugin) |
| `GGGG` | 2017 | ISO Week Year (depend: weekYear & isoWeek plugin) |

### LocalizedFormat

Expand Down
11 changes: 7 additions & 4 deletions docs/ja/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,13 @@ dayjs().format('Q Do k kk X x')
| `kk` | 01-24 | 1 始まりで 2 桁の時間 |
| `X` | 1360013296 | Unix タイムスタンプ (秒) |
| `x` | 1360013296123 | Unix タイムスタンプ (ミリ秒) |
| `w` | 1 2 ... 52 53 | Week of year (depend: weekOfYear plugin) |
| `ww` | 01 02 ... 52 53 | Week of year, 2-digits (depend: weekOfYear plugin) |
| `wo` | 1st 2nd ... 52nd 53rd | Week of year with ordinal (depend: weekOfYear plugin) |
| `gggg` | 2017 | Week Year (depend: weekYear plugin) |
| `w` | 1 2 ... 52 53 | Week of year (depend: weekOfYear plugin) |
| `ww` | 01 02 ... 52 53 | Week of year, 2-digits (depend: weekOfYear plugin) |
| `W` | 1 2 ... 52 53 | ISO Week of year (depend: weekOfYear & isoWeek plugin) |
| `WW` | 01 02 ... 52 53 | ISO Week of year, 2-digits (depend: weekOfYear & isoWeek plugin)|
| `wo` | 1st 2nd ... 52nd 53rd | Week of year with ordinal (depend: weekOfYear plugin) |
| `gggg` | 2017 | Week Year (depend: weekYear plugin) |
| `GGGG` | 2017 | ISO Week Year (depend: weekYear & isoWeek plugin) |

### LocalizedFormat

Expand Down
11 changes: 7 additions & 4 deletions docs/ko/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,13 @@ dayjs().format('Q Do k kk X x')
| `kk` | 01-24 | 시간, 2자리 표현, 1부터 시작 |
| `X` | 1360013296 | 유닉스 타임스템프, 초 |
| `x` | 1360013296123 | 유닉스 타임스탬프, 밀리 초 |
| `w` | 1 2 ... 52 53 | Week of year (depend: weekOfYear plugin) |
| `ww` | 01 02 ... 52 53 | Week of year, 2-digits (depend: weekOfYear plugin) |
| `wo` | 1st 2nd ... 52nd 53rd | Week of year with ordinal (depend: weekOfYear plugin) |
| `gggg` | 2017 | Week Year (depend: weekYear plugin) |
| `w` | 1 2 ... 52 53 | Week of year (depend: weekOfYear plugin) |
| `ww` | 01 02 ... 52 53 | Week of year, 2-digits (depend: weekOfYear plugin) |
| `W` | 1 2 ... 52 53 | ISO Week of year (depend: weekOfYear & isoWeek plugin) |
| `WW` | 01 02 ... 52 53 | ISO Week of year, 2-digits (depend: weekOfYear & isoWeek plugin)|
| `wo` | 1st 2nd ... 52nd 53rd | Week of year with ordinal (depend: weekOfYear plugin) |
| `gggg` | 2017 | Week Year (depend: weekYear plugin) |
| `GGGG` | 2017 | ISO Week Year (depend: weekYear & isoWeek plugin) |

### LocalizedFormat

Expand Down
11 changes: 7 additions & 4 deletions docs/pt-br/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,13 @@ Lista de formatos adicionados:
| `kk` | 01-24 | Hora, com 2 dígitos (começando do 1) |
| `X` | 1360013296 | Unix Timestamp em segundos |
| `x` | 1360013296123 | Unix Timestamp em milissegundos |
| `w` | 1 2 ... 52 53 | Week of year (depend: weekOfYear plugin) |
| `ww` | 01 02 ... 52 53 | Week of year, 2-digits (depend: weekOfYear plugin) |
| `wo` | 1st 2nd ... 52nd 53rd | Week of year with ordinal (depend: weekOfYear plugin) |
| `gggg` | 2017 | Week Year (depend: weekYear plugin) |
| `w` | 1 2 ... 52 53 | Week of year (depend: weekOfYear plugin) |
| `ww` | 01 02 ... 52 53 | Week of year, 2-digits (depend: weekOfYear plugin) |
| `W` | 1 2 ... 52 53 | ISO Week of year (depend: weekOfYear & isoWeek plugin) |
| `WW` | 01 02 ... 52 53 | ISO Week of year, 2-digits (depend: weekOfYear & isoWeek plugin)|
| `wo` | 1st 2nd ... 52nd 53rd | Week of year with ordinal (depend: weekOfYear plugin) |
| `gggg` | 2017 | Week Year (depend: weekYear plugin) |
| `GGGG` | 2017 | ISO Week Year (depend: weekYear & isoWeek plugin) |

### LocalizedFormat

Expand Down
3 changes: 3 additions & 0 deletions docs/zh-cn/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,11 @@ dayjs().format('Q Do k kk X x')
| `x` | 1360013296123 | 毫秒单位的 Unix 时间戳 |
| `w` | 1 2 ... 52 53 | 年中第几周 (依赖: weekOfYear 插件) |
| `ww` | 01 02 ... 52 53 | 年中第几周,二位数 (依赖: weekOfYear 插件) |
| `W` | 1 2 ... 52 53 | ISO 年中第几周 (依赖: weekOfYear & isoWeek 插件) |
| `WW` | 01 02 ... 52 53 | ISO 年中第几周,二位数 (依赖: weekOfYear & isoWeek 插件) |
| `wo` | 1st 2nd ... 52nd 53rd | 带序号的年中第几周 (依赖: weekOfYear 插件) |
| `gggg` | 2017 | 根据周计算的年份 (依赖: weekYear 插件) |
| `GGGG` | 2017 | ISO 根据周计算的年份 (依赖: weekYear & isoWeek& isoWeek 插件) |

### LocalizedFormat

Expand Down

0 comments on commit c8c0139

Please sign in to comment.