2019-06-10 15:38:54 +00:00
|
|
|
//! moment.js locale configuration
|
2020-07-23 21:12:30 +00:00
|
|
|
//! locale : Japanese [ja]
|
|
|
|
//! author : LI Long : https://github.com/baryon
|
2019-06-10 15:38:54 +00:00
|
|
|
|
|
|
|
;(function (global, factory) {
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
|
|
|
factory(global.moment)
|
|
|
|
}(this, (function (moment) { 'use strict';
|
|
|
|
|
2020-07-23 21:12:30 +00:00
|
|
|
//! moment.js locale configuration
|
2019-06-10 15:38:54 +00:00
|
|
|
|
|
|
|
var ja = moment.defineLocale('ja', {
|
2020-07-23 21:12:30 +00:00
|
|
|
eras: [
|
|
|
|
{
|
|
|
|
since: '2019-05-01',
|
|
|
|
offset: 1,
|
|
|
|
name: '令和',
|
|
|
|
narrow: '㋿',
|
|
|
|
abbr: 'R',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
since: '1989-01-08',
|
|
|
|
until: '2019-04-30',
|
|
|
|
offset: 1,
|
|
|
|
name: '平成',
|
|
|
|
narrow: '㍻',
|
|
|
|
abbr: 'H',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
since: '1926-12-25',
|
|
|
|
until: '1989-01-07',
|
|
|
|
offset: 1,
|
|
|
|
name: '昭和',
|
|
|
|
narrow: '㍼',
|
|
|
|
abbr: 'S',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
since: '1912-07-30',
|
|
|
|
until: '1926-12-24',
|
|
|
|
offset: 1,
|
|
|
|
name: '大正',
|
|
|
|
narrow: '㍽',
|
|
|
|
abbr: 'T',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
since: '1873-01-01',
|
|
|
|
until: '1912-07-29',
|
|
|
|
offset: 6,
|
|
|
|
name: '明治',
|
|
|
|
narrow: '㍾',
|
|
|
|
abbr: 'M',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
since: '0001-01-01',
|
|
|
|
until: '1873-12-31',
|
|
|
|
offset: 1,
|
|
|
|
name: '西暦',
|
|
|
|
narrow: 'AD',
|
|
|
|
abbr: 'AD',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
since: '0000-12-31',
|
|
|
|
until: -Infinity,
|
|
|
|
offset: 1,
|
|
|
|
name: '紀元前',
|
|
|
|
narrow: 'BC',
|
|
|
|
abbr: 'BC',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
eraYearOrdinalRegex: /(元|\d+)年/,
|
|
|
|
eraYearOrdinalParse: function (input, match) {
|
|
|
|
return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
|
|
|
|
},
|
|
|
|
months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
|
|
|
|
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
|
|
|
|
weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
|
|
|
|
weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
|
|
|
|
longDateFormat: {
|
|
|
|
LT: 'HH:mm',
|
|
|
|
LTS: 'HH:mm:ss',
|
|
|
|
L: 'YYYY/MM/DD',
|
|
|
|
LL: 'YYYY年M月D日',
|
|
|
|
LLL: 'YYYY年M月D日 HH:mm',
|
|
|
|
LLLL: 'YYYY年M月D日 dddd HH:mm',
|
|
|
|
l: 'YYYY/MM/DD',
|
|
|
|
ll: 'YYYY年M月D日',
|
|
|
|
lll: 'YYYY年M月D日 HH:mm',
|
|
|
|
llll: 'YYYY年M月D日(ddd) HH:mm',
|
2019-06-10 15:38:54 +00:00
|
|
|
},
|
|
|
|
meridiemParse: /午前|午後/i,
|
2020-07-23 21:12:30 +00:00
|
|
|
isPM: function (input) {
|
2019-06-10 15:38:54 +00:00
|
|
|
return input === '午後';
|
|
|
|
},
|
2020-07-23 21:12:30 +00:00
|
|
|
meridiem: function (hour, minute, isLower) {
|
2019-06-10 15:38:54 +00:00
|
|
|
if (hour < 12) {
|
|
|
|
return '午前';
|
|
|
|
} else {
|
|
|
|
return '午後';
|
|
|
|
}
|
|
|
|
},
|
2020-07-23 21:12:30 +00:00
|
|
|
calendar: {
|
|
|
|
sameDay: '[今日] LT',
|
|
|
|
nextDay: '[明日] LT',
|
|
|
|
nextWeek: function (now) {
|
|
|
|
if (now.week() !== this.week()) {
|
2019-06-10 15:38:54 +00:00
|
|
|
return '[来週]dddd LT';
|
|
|
|
} else {
|
|
|
|
return 'dddd LT';
|
|
|
|
}
|
|
|
|
},
|
2020-07-23 21:12:30 +00:00
|
|
|
lastDay: '[昨日] LT',
|
|
|
|
lastWeek: function (now) {
|
|
|
|
if (this.week() !== now.week()) {
|
2019-06-10 15:38:54 +00:00
|
|
|
return '[先週]dddd LT';
|
|
|
|
} else {
|
|
|
|
return 'dddd LT';
|
|
|
|
}
|
|
|
|
},
|
2020-07-23 21:12:30 +00:00
|
|
|
sameElse: 'L',
|
2019-06-10 15:38:54 +00:00
|
|
|
},
|
2020-07-23 21:12:30 +00:00
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}日/,
|
|
|
|
ordinal: function (number, period) {
|
2019-06-10 15:38:54 +00:00
|
|
|
switch (period) {
|
2020-07-23 21:12:30 +00:00
|
|
|
case 'y':
|
|
|
|
return number === 1 ? '元年' : number + '年';
|
2019-06-10 15:38:54 +00:00
|
|
|
case 'd':
|
|
|
|
case 'D':
|
|
|
|
case 'DDD':
|
|
|
|
return number + '日';
|
|
|
|
default:
|
|
|
|
return number;
|
|
|
|
}
|
|
|
|
},
|
2020-07-23 21:12:30 +00:00
|
|
|
relativeTime: {
|
|
|
|
future: '%s後',
|
|
|
|
past: '%s前',
|
|
|
|
s: '数秒',
|
|
|
|
ss: '%d秒',
|
|
|
|
m: '1分',
|
|
|
|
mm: '%d分',
|
|
|
|
h: '1時間',
|
|
|
|
hh: '%d時間',
|
|
|
|
d: '1日',
|
|
|
|
dd: '%d日',
|
|
|
|
M: '1ヶ月',
|
|
|
|
MM: '%dヶ月',
|
|
|
|
y: '1年',
|
|
|
|
yy: '%d年',
|
|
|
|
},
|
2019-06-10 15:38:54 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
return ja;
|
|
|
|
|
|
|
|
})));
|