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

Wrong weekday #195

Open
khadishi opened this issue Jan 13, 2020 · 2 comments
Open

Wrong weekday #195

khadishi opened this issue Jan 13, 2020 · 2 comments

Comments

@khadishi
Copy link

moment("1398/10/01", "jYYYY/jMM/jDD").weekday() return 1 with loadPersian and return 0 without loadPersion but must be 2

@behrang
Copy link
Member

behrang commented Jan 15, 2020 via email

@mohamadnavabi
Copy link

mohamadnavabi commented Jun 15, 2022

You can use this code:

const jalaliWeekdayNumber = {
  Saturday: 1,
  Sunday: 2,
  Monday: 3,
  Tuesday: 4,
  Wednesday: 5,
  Thursday: 6,
  Friday: 7,
};

 jalaliWeekdayNumber[moment("1403/02/26", "jYYYY/jMM/jDD").format("dddd")];

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

3 participants