168
回編集
(型明示しないのに暗黙のキャストをしてくれないとは舐めた真似をしてくれたな) |
(フォーマット指定できないと使いにくすぎた) |
||
67行目: | 67行目: | ||
ym = dfn <= hmd and 1 or math.floor((dfn - hmd - 1) / 30) + 2 | ym = dfn <= hmd and 1 or math.floor((dfn - hmd - 1) / 30) + 2 | ||
yd = ym == 1 and dfn or (dfn - hmd - 1) % 30 + 1 | yd = ym == 1 and dfn or (dfn - hmd - 1) % 30 + 1 | ||
return yy, ym, yd | return {yy, ym, yd} | ||
end | end | ||
85行目: | 85行目: | ||
gMonth = gMonth + 1 | gMonth = gMonth + 1 | ||
end | end | ||
return gYear, gMonth, gDay | return {gYear, gMonth, gDay} | ||
end | end | ||
local function wikiGregorianToYogurian(frame) | local function wikiGregorianToYogurian(frame) | ||
yDate = gregorianToYogurian(tonumber(frame.args[1]),tonumber(frame.args[2]),tonumber(frame.args[3])) | |||
return string.format(frame.args[4],yDate[1],yDate[2],yDate[3]) | |||
end | end | ||
local function wikiYogurianToGregorian(frame) | local function wikiYogurianToGregorian(frame) | ||
gDate = yogurianToGregorian(tonumber(frame.args[1]),tonumber(frame.args[2]),tonumber(frame.args[3])) | |||
return string.format(frame.args[4],gDate[1],gDate[2],gDate[3]) | |||
end | end | ||