168
回編集
(Wikiで動くように作ってなかったぞい) |
(型明示しないのに暗黙のキャストをしてくれないとは舐めた真似をしてくれたな) |
||
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 | return yy, ym, yd | ||
end | end | ||
85行目: | 85行目: | ||
gMonth = gMonth + 1 | gMonth = gMonth + 1 | ||
end | end | ||
return | return gYear, gMonth, gDay | ||
end | end | ||
local function wikiGregorianToYogurian(frame) | local function wikiGregorianToYogurian(frame) | ||
gregorianToYogurian(frame.args[1],frame.args[2],frame.args[3]) | return gregorianToYogurian(tonumber(frame.args[1]),tonumber(frame.args[2]),tonumber(frame.args[3])) | ||
end | end | ||
local function wikiYogurianToGregorian(frame) | local function wikiYogurianToGregorian(frame) | ||
yogurianToGregorian(frame.args[1],frame.args[2],frame.args[3]) | return yogurianToGregorian(tonumber(frame.args[1]),tonumber(frame.args[2]),tonumber(frame.args[3])) | ||
end | end | ||