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 locale on name of month #194

Open
artmarydotir opened this issue Dec 13, 2019 · 1 comment
Open

Wrong locale on name of month #194

artmarydotir opened this issue Dec 13, 2019 · 1 comment

Comments

@artmarydotir
Copy link

artmarydotir commented Dec 13, 2019

const momentG = require('moment');
const momentJ = require('moment-jalaali');

console.log(momentJ(new Date()).locale('fa').format('dddd jDD jMMMM jYYYY'));

Wrong Output:

جمعه ۲۲ Aazar ۱۳۹۸

Expected Output:

جمعه ۲۲ آذر ۱۳۹۸
@mahdiaslami
Copy link

you have to set this option:
moment.loadPersian({ dialect: 'persian-modern' });

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