Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid date with i18n date format #729

Closed
anupai opened this issue Nov 11, 2019 · 1 comment
Closed

Invalid date with i18n date format #729

anupai opened this issue Nov 11, 2019 · 1 comment

Comments

@anupai
Copy link

anupai commented Nov 11, 2019

Describe the bug

<script src="https://unpkg.com/dayjs"></script>
<script src="https://unpkg.com/dayjs/locale/pt-br"></script>

dayjs('Ter, 23 Fev 2021',{locale: 'pt-br'})
// invalid date

dayjs('Dom, 12 Jan 2020',{locale: 'pt-br'})
// Sat, 11 Jan 2020 13:00:00 GMT

This happens for most of the month in pt-br locale. Fev, Abr, Mai, Ago, Set, Out, Dez

Expected behavior
dayjs('Ter, 23 Fev 2021',{locale: 'pt-br'})
// Tue, 23 Feb 2021 13:00:00 GMT

Information

  • Day.js Version 1.8.12
  • OS: windows
  • Browser - chrome
  • Time zone: GMT-11:00 DST (Australian Eastern Standard Time ( AEST ))]
@iamkun
Copy link
Owner

iamkun commented Apr 17, 2020

check here as a reference.
https://day.js.org/docs/en/parse/string-format

@iamkun iamkun closed this as completed Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants