export const zeroLeader = (x) => ('0' + x).slice(-2) export const normaDate = (date) => { const d = new Date(date) return [d.getUTCFullYear().toString(), zeroLeader(d.getUTCMonth() + 1), zeroLeader(d.getUTCDate())].join('-') }
let date = new Date(dateString) let options = { year: 'numeric', month: 'numeric', day: 'numeric' } return date.toLocaleDateString('ru', options)
Обсуждают сегодня