6 lines
353 B
JavaScript
6 lines
353 B
JavaScript
// Archived publication timestamps are UTC; their UTC calendar days match the
|
|
// visible source dates and dated permalinks. Never use the build/browser timezone.
|
|
export function formatDate(date, {day = '2-digit', month = 'long'} = {}) {
|
|
return new Intl.DateTimeFormat('ru-RU', {day, month, year: 'numeric', timeZone: 'UTC'}).format(new Date(date));
|
|
}
|