forked from moment/moment
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request moment#229 from baryon/master
I fixed the merge conflicts and updated the jp language file to use the new meridiem function.
- Loading branch information
Showing
13 changed files
with
299 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
(function () { | ||
var lang = { | ||
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("_"), | ||
longDateFormat : { | ||
LT : "Ah:mm", | ||
L : "YYYY/MM/DD", | ||
LL : "YYYY年M月D日", | ||
LLL : "YYYY年M月D日 LT", | ||
LLLL : "YYYY年M月D日 dddd LT" | ||
}, | ||
meridiem : function (hour, minute, isLower) { | ||
if (hour < 12) { | ||
return "午前"; | ||
} else { | ||
return "午後"; | ||
} | ||
}, | ||
calendar : { | ||
sameDay : '[今日] LT', | ||
nextDay : '[明日] LT', | ||
nextWeek : '[来週]dddd LT', | ||
lastDay : '[昨日] LT', | ||
lastWeek : '[前週]dddd LT', | ||
sameElse : 'L' | ||
}, | ||
relativeTime : { | ||
future : "%s後", | ||
past : "%s前", | ||
s : "数秒", | ||
m : "1分", | ||
mm : "%d分", | ||
h : "1時間", | ||
hh : "%d時間", | ||
d : "1日", | ||
dd : "%d日", | ||
M : "1ヶ月", | ||
MM : "%dヶ月", | ||
y : "1年", | ||
yy : "%d年" | ||
}, | ||
ordinal : function (number) { | ||
return ''; | ||
} | ||
}; | ||
|
||
// Node | ||
if (typeof module !== 'undefined') { | ||
module.exports = lang; | ||
} | ||
// Browser | ||
if (typeof window !== 'undefined' && this.moment && this.moment.lang) { | ||
this.moment.lang('jp', lang); | ||
} | ||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.