Answer the question
In order to leave comments, you need to log in
How to convert the date '04/11/2020' to 'April 11'?
It is necessary date in the form of string can formatnut in a verbal type.
type from
to
const oldDateString = '11.04.2020'
const formatedDateString = '11 апреля'
Answer the question
In order to leave comments, you need to log in
There is moment.js
On pure js:
dateFormatter = (date) => {
let dateStr = new Date(Date.parse(date)).toLocaleString('ru-RU', {
month: "long",
day: "numeric"
})
return dateStr
}
dateFormatter('11.04.2020') //"4 ноября"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question