Skip to content

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.

1 participant