1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-09-20 07:41:56 +00:00
musix-oss/node_modules/date-and-time/locale/ru.js
2020-03-03 22:30:50 +02:00

53 lines
2.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @preserve date-and-time.js locale configuration
* @preserve Russian (ru)
* @preserve It is using moment.js locale configuration as a reference.
*/
(function (global) {
'use strict';
var exec = function (date) {
date.locale('ru', {
res: {
MMMM: ['Января', 'Февраля', 'Марта', 'Апреля', 'Мая', 'Июня', 'Июля', 'Августа', 'Сентября', 'Октября', 'Ноября', 'Декабря'],
MMM: ['янв', 'фев', 'мар', 'апр', 'мая', 'июня', 'июля', 'авг', 'сен', 'окт', 'ноя', 'дек'],
dddd: ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'],
ddd: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
dd: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
A: ['ночи', 'утра', 'дня', 'вечера']
},
formatter: {
A: function (d) {
var h = d.getHours();
if (h < 4) {
return this.res.A[0]; // ночи
} else if (h < 12) {
return this.res.A[1]; // утра
} else if (h < 17) {
return this.res.A[2]; // дня
}
return this.res.A[3]; // вечера
}
},
parser: {
h12: function (h, a) {
if (a < 2) {
return h; // ночи, утра
}
return h > 11 ? h : h + 12; // дня, вечера
}
}
});
};
if (typeof module === 'object' && typeof module.exports === 'object') {
(module.paths || []).push('./');
exec(require('date-and-time'));
} else if (typeof define === 'function' && define.amd) {
define(['date-and-time'], exec);
} else {
exec(global.date);
}
}(this));