Answer the question
In order to leave comments, you need to log in
How to make full-icu work with nodejs?
Colleagues good day, I ask for help if anyone has come across such a situation, it is necessary to determine the time and day of the week in Argentina. Nodejs project, util module, here is the code:
static getDate() {
let days = {
'lunes': `понедельник`,
'martes': `вторник`,
'miércoles': `среда`,
'jueves': `четверг`,
'viernes': `пятница`,
'sábado': `суббота`,
'domingo': `воскресенье`
};
let locales = `en-AR`;
let options = {
timeZone: "America/Argentina/Buenos_Aires",
weekday: `long`,
hour12: false,
year: `numeric`,
month: `2-digit`,
day: `2-digit`,
hour: `2-digit`,
minute: `2-digit`
};
return new Date().toLocaleString(locales, options);
}
Tuesday, 10/29/2019, 23:39
"scripts": {
"start": "node --icu-data-dir=node_modules/full-icu server.js",
"test": "node --icu-data-dir=node_modules/full-icu test.js",
"build": "gulp",
"forever": "forever start -c \"node --icu-data-dir=node_modules/full-icu\" server"
},
Answer the question
In order to leave comments, you need to log in
I'm sorry for the trouble, the question has been removed, you just had to change the locales and write es-AR instead of en-AR, everything works))) inattention
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question