From: LI Long Date: Tue, 15 May 2012 03:08:19 +0000 (+0900) Subject: fixed a minor LLL format for Japanese X-Git-Tag: 1.7.0~27^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F331%2Fhead;p=thirdparty%2Fmoment.git fixed a minor LLL format for Japanese --- diff --git a/lang/jp.js b/lang/jp.js index 4c1b195dd..b3bae9a90 100644 --- a/lang/jp.js +++ b/lang/jp.js @@ -5,11 +5,11 @@ weekdays : "日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"), weekdaysShort : "日_月_火_水_木_金_土".split("_"), longDateFormat : { - LT : "Ah:mm", + LT : "Ah時m分", L : "YYYY/MM/DD", LL : "YYYY年M月D日", - LLL : "YYYY年M月D日 LT", - LLLL : "YYYY年M月D日 dddd LT" + LLL : "YYYY年M月D日LT", + LLLL : "YYYY年M月D日LT dddd" }, meridiem : function (hour, minute, isLower) { if (hour < 12) { diff --git a/test/lang/jp.js b/test/lang/jp.js index 6043555b4..65ca1bcfe 100644 --- a/test/lang/jp.js +++ b/test/lang/jp.js @@ -48,8 +48,8 @@ exports["lang:jp"] = { ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45 day of the year'], ['L', '2010/02/14'], ['LL', '2010年2月14日'], - ['LLL', '2010年2月14日 午後3:25'], - ['LLLL', '2010年2月14日 日曜日 午後3:25'] + ['LLL', '2010年2月14日午後3時25分'], + ['LLLL', '2010年2月14日午後3時25分 日曜日'] ], b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), i; @@ -147,12 +147,12 @@ exports["lang:jp"] = { var a = moment().hours(2).minutes(0).seconds(0); - test.equal(moment(a).calendar(), "今日 午前2:00", "today at the same time"); - test.equal(moment(a).add({ m: 25 }).calendar(), "今日 午前2:25", "Now plus 25 min"); - test.equal(moment(a).add({ h: 1 }).calendar(), "今日 午前3:00", "Now plus 1 hour"); - test.equal(moment(a).add({ d: 1 }).calendar(), "明日 午前2:00", "tomorrow at the same time"); - test.equal(moment(a).subtract({ h: 1 }).calendar(), "今日 午前1:00", "Now minus 1 hour"); - test.equal(moment(a).subtract({ d: 1 }).calendar(), "昨日 午前2:00", "yesterday at the same time"); + test.equal(moment(a).calendar(), "今日 午前2時0分", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "今日 午前2時25分", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "今日 午前3時0分", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "明日 午前2時0分", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "今日 午前1時0分", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "昨日 午前2時0分", "yesterday at the same time"); test.done(); },