diff --git a/app/scripts/lib/sites/narou/publish.js b/app/scripts/lib/sites/narou/publish.js index 380734a..628baef 100644 --- a/app/scripts/lib/sites/narou/publish.js +++ b/app/scripts/lib/sites/narou/publish.js @@ -31,8 +31,7 @@ function getCode(pub) { }; if (pub.time) { const time = moment(pub.time).tz("Asia/Tokyo"); - embedPub.month = time.format("YYYY-MM"); - embedPub.day = time.format("D"); + embedPub.date = time.format("YYYY年M月D日"); embedPub.hour = time.format("H"); } return ` @@ -49,9 +48,8 @@ function getCode(pub) { form.subtitle.value = pub.title; form.novel.value = pub.body; - if (pub.month && pub.day) { - form.month.value = pub.month; - form.day.value = pub.day; + if (pub.date) { + form.reserve_date.value = pub.date; form.hour.value = pub.hour; } diff --git a/test/lib/sites/narou/publish-test.js b/test/lib/sites/narou/publish-test.js index 5f6a3f3..a884678 100644 --- a/test/lib/sites/narou/publish-test.js +++ b/test/lib/sites/narou/publish-test.js @@ -30,8 +30,7 @@ describe("NarouPublish", () => { assert.deepEqual(embedPub, { title: pub.title, body: pub.body, - month: "2016-03", - day: "1", + date: "2016年3月1日", hour: "11", }); }); @@ -59,8 +58,7 @@ describe("NarouPublish", () => { assert.deepEqual(embedPub, { title: pub.title, body: pub.body, - month: "2016-03", - day: "1", + date: "2016年3月1日", hour: "11", }); });