168
回編集
(ページの作成:「local p = {} local function getTable(frame) yogurian = require("モジュール:ヨーグレキ") year = tonumber(frame.args[1]) month = tonumber(frame.args[2]) day…」) |
(入力を増やした) |
||
3行目: | 3行目: | ||
local function getTable(frame) | local function getTable(frame) | ||
yogurian = require("モジュール:ヨーグレキ") | yogurian = require("モジュール:ヨーグレキ") | ||
ar = {string.match(frame.args[1], "(%d+)%-(%d+)%-(%d+)")} | |||
if ar[1] == nil then | |||
year = tonumber(frame.args[1]) | |||
month = tonumber(frame.args[2]) | |||
day = tonumber(frame.args[3]) | |||
else | |||
year = tonumber(ar[1]) | |||
month = tonumber(ar[2]) | |||
day = tonumber(ar[3]) | |||
end | |||
days = month == 1 and (yogurian.isLeap(year + 2020) and 36 or 35) or 30 | days = month == 1 and (yogurian.isLeap(year + 2020) and 36 or 35) or 30 | ||
beforeDays = month == 2 and (yogurian.isLeap(year + 2020) and 36 or 35) or 30 | beforeDays = month == 2 and (yogurian.isLeap(year + 2020) and 36 or 35) or 30 |