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

added locale option for moment #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lindesvard
Copy link

I want to be able to specify which language moment should use. And you can utilize this even more. For example you can get all the month/week names from moment instead opt-in value.

const moment = require('moment');

moment.locale('sv'); // Swedish

moment.weekdays()

[ 'söndag',  'måndag',  'tisdag',  'onsdag',  'torsdag',  'fredag',  'lördag' ]

moment.weekdaysShort()

[ 'sön', 'mån', 'tis', 'ons', 'tor', 'fre', 'lör' ]

moment.months()

[ 'januari',  'februari',  'mars',  'april',  'maj',  'juni',  'juli',  'augusti',  'september',  'oktober',  'november',  'december' ]

moment.monthsShort()

[ 'jan',  'feb',  'mar',  'apr',  'maj',  'jun',  'jul',  'aug',  'sep',  'okt',  'nov',  'dec' ]

Best regards
CG

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

Successfully merging this pull request may close these issues.

None yet

1 participant