Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: iamkun/dayjs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.8.16
Choose a base ref
...
head repository: iamkun/dayjs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.8.17
Choose a head ref
  • 17 commits
  • 27 files changed
  • 6 contributors

Commits on Aug 27, 2019

  1. Copy the full SHA
    8877883 View commit details

Commits on Sep 19, 2019

  1. Update FUNDING.yml

    iamkun authored Sep 19, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9a2e7b9 View commit details

Commits on Sep 20, 2019

  1. fix: Update nb locale (#679)

    fjeddy authored and iamkun committed Sep 20, 2019
    Copy the full SHA
    1063b0e View commit details

Commits on Sep 27, 2019

  1. docs: Update Z format docs (#683)

    Missing 0 in single digit hours
    simPod authored and iamkun committed Sep 27, 2019
    Copy the full SHA
    90e65a1 View commit details
  2. Copy the full SHA
    d683dcf View commit details

Commits on Oct 3, 2019

  1. Copy the full SHA
    f8ca3d4 View commit details

Commits on Oct 9, 2019

  1. fix: Update advancedFormat plugin to support w ww wo week tokens … (#678

    )
    
    * fix: Update advancedFormat plugin to support w ww wo week tokens
    
    fix #676
    
    * docs: Update AdvancedFormat doc
    
    * docs: Update docs
    iamkun authored Oct 9, 2019
    Copy the full SHA
    26cfa63 View commit details

Commits on Oct 24, 2019

  1. Copy the full SHA
    d148115 View commit details

Commits on Oct 25, 2019

  1. Copy the full SHA
    c371f21 View commit details
  2. Copy the full SHA
    3ad7e8d View commit details
  3. chore: performance update

    iamkun committed Oct 25, 2019
    Copy the full SHA
    0224e70 View commit details

Commits on Oct 30, 2019

  1. fix: Update Ukrainian locale (uk) (#710)

    relativeTime.past is defined as '%s назад' which is Russian translation. Correct Ukrainian localisation is '%s тому'
    Kashkovsky authored and iamkun committed Oct 30, 2019
    Copy the full SHA
    360161c View commit details

Commits on Oct 31, 2019

  1. fix: Update Polish locale (pl)(#713)

    `d` and `dd` is responsible for day and days. In polish day means dzień, week means tydzień.
    ar4s authored and iamkun committed Oct 31, 2019
    Copy the full SHA
    30d2f02 View commit details

Commits on Nov 5, 2019

  1. Update README.md

    iamkun authored Nov 5, 2019
    Copy the full SHA
    591b717 View commit details

Commits on Nov 6, 2019

  1. Copy the full SHA
    a5bf94f View commit details
  2. chroe: fix ci (#721)

    iamkun authored Nov 6, 2019
    Copy the full SHA
    ff4b802 View commit details
  3. chore(release): 1.8.17 [skip ci]

    ## [1.8.17](v1.8.16...v1.8.17) (2019-11-06)
    
    ### Bug Fixes
    
    * Fix set utcOffset in utc mode ([d148115](d148115))
    * Update advancedFormat plugin to support w ww wo week tokens … ([#678](#678)) ([26cfa63](26cfa63)), closes [#676](#676)
    * Update ka locale weekdays ([f8ca3d4](f8ca3d4))
    * Update nb locale ([#679](#679)) ([1063b0e](1063b0e))
    * Update Polish locale (pl)([#713](#713)) ([30d2f02](30d2f02))
    * Update Ukrainian locale (uk) ([#710](#710)) ([360161c](360161c))
    * UTC plugin set utcOffset value ([#668](#668)) ([8877883](8877883))
    semantic-release-bot committed Nov 6, 2019
    Copy the full SHA
    5799383 View commit details
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: [iamkun]
patreon: # Replace with a single Patreon username
open_collective: dayjs
ko_fi: # Replace with a single Ko-fi username
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ script:
- codecov
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
npx travis-deploy-once && npm run build && npm run babel && npm install -g @semantic-release/changelog @semantic-release/git semantic-release && semantic-release && npm run test:sauce;
npx travis-deploy-once --pro && npm run build && npm run babel && npm install -g @semantic-release/changelog @semantic-release/git semantic-release && semantic-release && npm run test:sauce;
fi
branches:
except:
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## [1.8.17](https://github.com/iamkun/dayjs/compare/v1.8.16...v1.8.17) (2019-11-06)


### Bug Fixes

* Fix set utcOffset in utc mode ([d148115](https://github.com/iamkun/dayjs/commit/d148115dad8f1a5afc0a64e9b8163dfeba4616b6))
* Update advancedFormat plugin to support w ww wo week tokens … ([#678](https://github.com/iamkun/dayjs/issues/678)) ([26cfa63](https://github.com/iamkun/dayjs/commit/26cfa63a524b803f7966dac5464f9cbf8f63387e)), closes [#676](https://github.com/iamkun/dayjs/issues/676)
* Update ka locale weekdays ([f8ca3d4](https://github.com/iamkun/dayjs/commit/f8ca3d4ba1d3cbe41613d3909c0627935a51a0c4))
* Update nb locale ([#679](https://github.com/iamkun/dayjs/issues/679)) ([1063b0e](https://github.com/iamkun/dayjs/commit/1063b0e1b5c19a1354d233cc0f21438e7073233a))
* Update Polish locale (pl)([#713](https://github.com/iamkun/dayjs/issues/713)) ([30d2f02](https://github.com/iamkun/dayjs/commit/30d2f026b47188833a4f44fee4bab52467d4a718))
* Update Ukrainian locale (uk) ([#710](https://github.com/iamkun/dayjs/issues/710)) ([360161c](https://github.com/iamkun/dayjs/commit/360161cac75f597fdd51d9d1ff138601282a1b4b))
* UTC plugin set utcOffset value ([#668](https://github.com/iamkun/dayjs/issues/668)) ([8877883](https://github.com/iamkun/dayjs/commit/88778838e71dd309e79cd1a8094d5bea36ca3390))

## [1.8.16](https://github.com/iamkun/dayjs/compare/v1.8.15...v1.8.16) (2019-08-27)


2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -102,6 +102,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
<a href="https://opencollective.com/dayjs/sponsor/0/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/dayjs/sponsor/1/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/dayjs/sponsor/2/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/dayjs/sponsor/3/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/3/avatar.svg"></a>

## Contributors

@@ -114,6 +115,7 @@ And thank you to all our backers! 🙏
<a href="https://opencollective.com/dayjs/backer/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/dayjs/backer/0/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/dayjs/backer/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/dayjs/backer/1/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/dayjs/backer/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/dayjs/backer/2/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/dayjs/backer/3/website?requireActive=false" target="_blank"><img src="https://opencollective.com/dayjs/backer/3/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/dayjs#backers" target="_blank"><img src="https://opencollective.com/dayjs/contributors.svg?width=890" /></a>

## License
2 changes: 1 addition & 1 deletion docs/en/API-reference.md
Original file line number Diff line number Diff line change
@@ -302,7 +302,7 @@ dayjs('2019-01-25').format('DD/MM/YYYY') // '25/01/2019'
| `s` | 0-59 | The second |
| `ss` | 00-59 | The second, 2-digits |
| `SSS` | 000-999 | The millisecond, 3-digits |
| `Z` | +5:00 | The offset from UTC |
| `Z` | +05:00 | The offset from UTC |
| `ZZ` | +0500 | The offset from UTC, 2-digits |
| `A` | AM PM | |
| `a` | am pm | |
22 changes: 13 additions & 9 deletions docs/en/Plugin.md
Original file line number Diff line number Diff line change
@@ -104,14 +104,18 @@ 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 |
| 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) |

### LocalizedFormat

@@ -368,7 +372,7 @@ dayjs('2018 Enero 15', 'YYYY MMMM DD', 'es')
| `S` | 0-9 | Hundreds of milliseconds, 1-digit |
| `SS` | 00-99 | Tens of milliseconds, 2-digits |
| `SSS` | 000-999 | Milliseconds, 3-digits |
| `Z` | -5:00 | Offset from UTC |
| `Z` | -05:00 | Offset from UTC |
| `ZZ` | -0500 | Compact offset from UTC, 2-digits |
| `A` | AM PM | Post or ante meridiem, upper-case |
| `a` | am pm | Post or ante meridiem, lower-case |
2 changes: 1 addition & 1 deletion docs/es-es/API-reference.md
Original file line number Diff line number Diff line change
@@ -302,7 +302,7 @@ dayjs('2019-01-25').format('DD/MM/YYYY') // '25/01/2019'
| `s` | 0-59 | Segundos |
| `ss` | 00-59 | Segundos, con 2 dígitos |
| `SSS` | 000-999 | Milisegundos, con 3 dígitos |
| `Z` | +5:00 | Diferencia horaria UTC |
| `Z` | +05:00 | Diferencia horaria UTC |
| `ZZ` | +0500 | Diferencia horaria UTC, con 2 dígitos |
| `A` | AM PM | |
| `a` | am pm | |
22 changes: 13 additions & 9 deletions docs/es-es/Plugin.md
Original file line number Diff line number Diff line change
@@ -104,14 +104,18 @@ dayjs().format('Q Do k kk X x')

Lista de formatos añadidos:

| Formato | Salida | Descripción |
| ------- | ------------- | ------------------------------------- |
| `Q` | 1-4 | Cuarto |
| `Do` | 1º 2º ... 31º | Día del mes con ordinal |
| `k` | 1-24 | Hora, contando desde 1 |
| `kk` | 01-24 | Hora, con 2 dígitos, contando desde 1 |
| `X` | 1360013296 | Tiempo Unix en segundos |
| `x` | 1360013296123 | Tiempo Unix en milisegundos |
| Formato | Salida | Descripción |
| ------- | --------------------- | ----------------------------------------------------- |
| `Q` | 1-4 | Cuarto |
| `Do` | 1º 2º ... 31º | Día del mes con ordinal |
| `k` | 1-24 | Hora, contando desde 1 |
| `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) |

### LocalizedFormat

@@ -364,7 +368,7 @@ dayjs('2018 Enero 15', 'YYYY MMMM DD', 'es')
| `S` | 0-9 | Hundreds of milliseconds, 1-digit |
| `SS` | 00-99 | Tens of milliseconds, 2-digits |
| `SSS` | 000-999 | Milliseconds, 3-digits |
| `Z` | -5:00 | Offset from UTC |
| `Z` | -05:00 | Offset from UTC |
| `ZZ` | -0500 | Compact offset from UTC, 2-digits |
| `A` | AM PM | Post or ante meridiem, upper-case |
| `a` | am pm | Post or ante meridiem, lower-case |
2 changes: 1 addition & 1 deletion docs/ja/API-reference.md
Original file line number Diff line number Diff line change
@@ -302,7 +302,7 @@ dayjs('2019-01-25').format('DD/MM/YYYY') // '25/01/2019'
| `s` | 0-59 ||
| `ss` | 00-59 | 2 桁の秒 |
| `SSS` | 000-999 | 3 桁のミリ秒 |
| `Z` | +5:00 | UTC からのオフセット |
| `Z` | +05:00 | UTC からのオフセット |
| `ZZ` | +0500 | UTC からの 2 桁のオフセット |
| `A` | AM PM | 午前と午後(大文字) |
| `a` | am pm | 午前と午後(小文字) |
22 changes: 13 additions & 9 deletions docs/ja/Plugin.md
Original file line number Diff line number Diff line change
@@ -104,14 +104,18 @@ dayjs().format('Q Do k kk X x')

追加されるフォーマットの一覧:

| フォーマット | 出力 | 説明 |
| ------------ | ---------------- | ---------------------------- |
| `Q` | 1-4 | 四半期 |
| `Do` | 1st 2nd ... 31st | 序数付きの日 |
| `k` | 1-24 | 1 始まりの時間 |
| `kk` | 01-24 | 1 始まりで 2 桁の時間 |
| `X` | 1360013296 | Unix タイムスタンプ (秒) |
| `x` | 1360013296123 | Unix タイムスタンプ (ミリ秒) |
| フォーマット | 出力 | 説明 |
| ------------ | --------------------- | ----------------------------------------------------- |
| `Q` | 1-4 | 四半期 |
| `Do` | 1st 2nd ... 31st | 序数付きの日 |
| `k` | 1-24 | 1 始まりの時間 |
| `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) |

### LocalizedFormat

@@ -373,7 +377,7 @@ dayjs('2018 5月 15', 'YYYY MMMM DD', 'ja')
| `S` | 0-9 | Hundreds of milliseconds, 1-digit |
| `SS` | 00-99 | Tens of milliseconds, 2-digits |
| `SSS` | 000-999 | Milliseconds, 3-digits |
| `Z` | -5:00 | Offset from UTC |
| `Z` | -05:00 | Offset from UTC |
| `ZZ` | -0500 | Compact offset from UTC, 2-digits |
| `A` | AM PM | Post or ante meridiem, upper-case |
| `a` | am pm | Post or ante meridiem, lower-case |
2 changes: 1 addition & 1 deletion docs/ko/API-reference.md
Original file line number Diff line number Diff line change
@@ -301,7 +301,7 @@ dayjs('2019-01-25').format('DD/MM/YYYY') // '25/01/2019'
| `s` | 0-59 ||
| `ss` | 00-59 | 초, 두 자리로 표현 |
| `SSS` | 000-999 | 밀리 초, 3자리로 표현 |
| `Z` | +5:00 | UTC로부터 추가된 시간 |
| `Z` | +05:00 | UTC로부터 추가된 시간 |
| `ZZ` | +0500 | UTC로부터 추가된 시간, 두자리로 표현 |
| `A` | AM PM | |
| `a` | am pm | |
22 changes: 13 additions & 9 deletions docs/ko/Plugin.md
Original file line number Diff line number Diff line change
@@ -104,14 +104,18 @@ dayjs().format('Q Do k kk X x')

추가된 형식 목록:

| Format | Output | Description |
| ------ | ---------------- | ---------------------------- |
| `Q` | 1-4 | 분기 |
| `Do` | 1st 2nd ... 31st | 서수형식의 일자 명 |
| `k` | 1-24 | 시간, 1부터 시작 |
| `kk` | 01-24 | 시간, 2자리 표현, 1부터 시작 |
| `X` | 1360013296 | 유닉스 타임스템프, 초 |
| `x` | 1360013296123 | 유닉스 타임스탬프, 밀리 초 |
| Format | Output | Description |
| ------ | --------------------- | ----------------------------------------------------- |
| `Q` | 1-4 | 분기 |
| `Do` | 1st 2nd ... 31st | 서수형식의 일자 명 |
| `k` | 1-24 | 시간, 1부터 시작 |
| `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) |

### LocalizedFormat

@@ -365,7 +369,7 @@ dayjs('2018 5월 15', 'YYYY MMMM DD', 'ko')
| `S` | 0-9 | Hundreds of milliseconds, 1-digit |
| `SS` | 00-99 | Tens of milliseconds, 2-digits |
| `SSS` | 000-999 | Milliseconds, 3-digits |
| `Z` | -5:00 | Offset from UTC |
| `Z` | -05:00 | Offset from UTC |
| `ZZ` | -0500 | Compact offset from UTC, 2-digits |
| `A` | AM PM | Post or ante meridiem, upper-case |
| `a` | am pm | Post or ante meridiem, lower-case |
2 changes: 1 addition & 1 deletion docs/pt-br/API-reference.md
Original file line number Diff line number Diff line change
@@ -300,7 +300,7 @@ dayjs('2019-01-25').format('DD/MM/YYYY') // '25/01/2019'
| `s` | 0-59 | Segundo |
| `ss` | 00-59 | Segundo, com 2 dígitos |
| `SSS` | 000-999 | Milisegundo, com 3 dígitos |
| `Z` | +5:00 | Diferença do fuso horário UTC |
| `Z` | +05:00 | Diferença do fuso horário UTC |
| `ZZ` | +0500 | Diferença do fuso horário UTC, com 2 dígitos |
| `A` | AM PM | |
| `a` | am pm | |
2 changes: 1 addition & 1 deletion docs/pt-br/I18n.md
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ dayjs.locale('es') // usar a localidade 'es' globalmente
dayjs.locale('de-german', de) // usar a localidade 'de' e alterar a string padrão
const customizedLocaleObject = { ... } // mais detalhes podem ser vistos na sessão de customização abaixo
dayjs.locale(customizedLocaleObject) // usar uma localidade customizada
dayjs.locale('en') // alterna de volta a localidade globalmente para padrão em inglês
dayjs.locale('en') // alterna de volta a localidade globalmente para padrão em inglês
```

- Mudar o _locale_ global não afeta instâncias já existentes.
22 changes: 13 additions & 9 deletions docs/pt-br/Plugin.md
Original file line number Diff line number Diff line change
@@ -104,14 +104,18 @@ dayjs().format('Q Do k kk X x')

Lista de formatos adicionados:

| Formato | Saída | Descrição |
| ------- | ---------------- | ------------------------------------ |
| `Q` | 1-4 | Quarter |
| `Do` | 1st 2nd ... 31st | Dia do mês com ordinal |
| `k` | 1-24 | Hora (começando do 1) |
| `kk` | 01-24 | Hora, com 2 dígitos (começando do 1) |
| `X` | 1360013296 | Unix Timestamp em segundos |
| `x` | 1360013296123 | Unix Timestamp em milissegundos |
| Formato | Saída | Descrição |
| ------- | --------------------- | ----------------------------------------------------- |
| `Q` | 1-4 | Quarter |
| `Do` | 1st 2nd ... 31st | Dia do mês com ordinal |
| `k` | 1-24 | Hora (começando do 1) |
| `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) |

### LocalizedFormat

@@ -364,7 +368,7 @@ dayjs('2018 Fevereiro 15', 'YYYY MMMM DD', 'pt_br')
| `S` | 0-9 | Hundreds of milliseconds, 1-digit |
| `SS` | 00-99 | Tens of milliseconds, 2-digits |
| `SSS` | 000-999 | Milliseconds, 3-digits |
| `Z` | -5:00 | Offset from UTC |
| `Z` | -05:00 | Offset from UTC |
| `ZZ` | -0500 | Compact offset from UTC, 2-digits |
| `A` | AM PM | Post or ante meridiem, upper-case |
| `a` | am pm | Post or ante meridiem, lower-case |
Loading