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

convert jalali date to gregor date #32

Open
mehdi-ard opened this issue Jun 22, 2021 · 1 comment
Open

convert jalali date to gregor date #32

mehdi-ard opened this issue Jun 22, 2021 · 1 comment

Comments

@mehdi-ard
Copy link

mehdi-ard commented Jun 22, 2021

hi,
When I want to change the date, the date is converted as follows and the same jalali date is returned

1400/05/07 => Thu May 08 1400 00:00:00 GMT+0325 (Iran Daylight Time)

const date = "1400/05/07"
dayjs(date ).calendar("gregory").locale("en")
@ph98
Copy link

ph98 commented Jan 18, 2022

i think you should pass {jalali: true} to dayjs to make it work

something like this:

dayjs(date, {jalali:true} ).calendar("gregory").locale("en")

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