Module:Roman Date: Difference between revisions
Fix leap year problem
(Add AVC dating, all years will be printed with their AVC date) |
(Fix leap year problem) |
||
Line 57: | Line 57: | ||
local dayLookup = { { 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ' }, { 'a.d. IV Non. ', 'a.d. IV Non. ', 'a.d. VI Non. ', 'a.d. IV Non. ', 'a.d. VI Non. ', 'a.d. IV Non. ', 'a.d. VI Non. ', 'a.d. IV Non. ', 'a.d. IV Non. ', 'a.d. VI Non. ', 'a.d. IV Non. ', 'a.d. IV Non. ', 'a.d. IV Non. ' }, { 'a.d. III Non. ', 'a.d. III Non. ', 'a.d. V Non. ', 'a.d. III Non. ', 'a.d. V Non. ', 'a.d. III Non. ', 'a.d. V Non. ', 'a.d. III Non. ', 'a.d. III Non. ', 'a.d. V Non. ', 'a.d. III Non. ', 'a.d. III Non. ', 'a.d. III Non. ' }, { 'pr. Non. ', 'pr. Non. ', 'a.d. IV Non. ', 'pr. Non. ', 'a.d. IV Non. ', 'pr. Non. ', 'a.d. IV Non. ', 'pr. Non. ', 'pr. Non. ', 'a.d. IV Non. ', 'pr. Non. ', 'pr. Non. ', 'pr. Non. ' }, { 'Non. ', 'Non. ', 'a.d. III Non. ', 'Non. ', 'a.d. III Non. ', 'Non. ', 'a.d. III Non. ', 'Non. ', 'Non. ', 'a.d. III Non. ', 'Non. ', 'Non. ', 'Non. ' }, { 'a.d. VIII Id. ', 'a.d. VIII Id. ', 'pr. Non. ', 'a.d. VIII Id. ', 'pr. Non. ', 'a.d. VIII Id. ', 'pr. Non. ', 'a.d. VIII Id. ', 'a.d. VIII Id. ', 'pr. Non. ', 'a.d. VIII Id. ', 'a.d. VIII Id. ', 'a.d. VIII Id. ' }, { 'a.d. VII Id. ', 'a.d. VII Id. ', 'Non. ', 'a.d. VII Id. ', 'Non. ', 'a.d. VII Id. ', 'Non. ', 'a.d. VII Id. ', 'a.d. VII Id. ', 'Non. ', 'a.d. VII Id. ', 'a.d. VII Id. ', 'a.d. VII Id. ' }, { 'a.d. VI Id. ', 'a.d. VI Id. ', 'a.d. VIII Id. ', 'a.d. VI Id. ', 'a.d. VIII Id. ', 'a.d. VI Id. ', 'a.d. VIII Id. ', 'a.d. VI Id. ', 'a.d. VI Id. ', 'a.d. VIII Id. ', 'a.d. VI Id. ', 'a.d. VI Id. ', 'a.d. VI Id. ' }, { 'a.d. V Id. ', 'a.d. V Id. ', 'a.d. VII Id. ', 'a.d. V Id. ', 'a.d. VII Id. ', 'a.d. V Id. ', 'a.d. VII Id. ', 'a.d. V Id. ', 'a.d. V Id. ', 'a.d. VII Id. ', 'a.d. V Id. ', 'a.d. V Id. ', 'a.d. V Id. ' }, { 'a.d. IV Id. ', 'a.d. IV Id. ', 'a.d. VI Id. ', 'a.d. IV Id. ', 'a.d. VI Id. ', 'a.d. IV Id. ', 'a.d. VI Id. ', 'a.d. IV Id. ', 'a.d. IV Id. ', 'a.d. VI Id. ', 'a.d. IV Id. ', 'a.d. IV Id. ', 'a.d. IV Id. ' }, { 'a.d. III Id. ', 'a.d. III Id. ', 'a.d. V Id. ', 'a.d. III Id. ', 'a.d. V Id. ', 'a.d. III Id. ', 'a.d. V Id. ', 'a.d. III Id. ', 'a.d. III Id. ', 'a.d. V Id. ', 'a.d. III Id. ', 'a.d. III Id. ', 'a.d. III Id. ' }, { 'pr. Id. ', 'pr. Id. ', 'a.d. IV Id. ', 'pr. Id. ', 'a.d. IV Id. ', 'pr. Id. ', 'a.d. IV Id. ', 'pr. Id. ', 'pr. Id. ', 'a.d. IV Id. ', 'pr. Id. ', 'pr. Id. ', 'pr. Id. ' }, { 'Id. ', 'Id. ', 'a.d. III Id. ', 'Id. ', 'a.d. III Id. ', 'Id. ', 'a.d. III Id. ', 'Id. ', 'Id. ', 'a.d. III Id. ', 'Id. ', 'Id. ', 'Id. ' }, { 'a.d. XIX Kal. ', 'a.d. XVI Kal. ', 'pr. Id. ', 'a.d. XVIII Kal. ', 'pr. Id. ', 'a.d. XVIII Kal. ', 'pr. Id. ', 'a.d. XIX Kal. ', 'a.d. XVIII Kal. ', 'pr. Id. ', 'a.d. XVIII Kal. ', 'a.d. XIX Kal. ', None }, { 'a.d. XVIII Kal. ', 'a.d. XV Kal. ', 'Id. ', 'a.d. XVII Kal. ', 'Id. ', 'a.d. XVII Kal. ', 'Id. ', 'a.d. XVIII Kal. ', 'a.d. XVII Kal. ', 'Id. ', 'a.d. XVII Kal. ', 'a.d. XVIII Kal. ', None }, { 'a.d. XVII Kal. ', 'a.d. XIV Kal. ', 'a.d. XVII Kal. ', 'a.d. XVI Kal. ', 'a.d. XVII Kal. ', 'a.d. XVI Kal. ', 'a.d. XVII Kal. ', 'a.d. XVII Kal. ', 'a.d. XVI Kal. ', 'a.d. XVII Kal. ', 'a.d. XVI Kal. ', 'a.d. XVII Kal. ', None }, { 'a.d. XVI Kal. ', 'a.d. XIII Kal. ', 'a.d. XVI Kal. ', 'a.d. XV Kal. ', 'a.d. XVI Kal. ', 'a.d. XV Kal. ', 'a.d. XVI Kal. ', 'a.d. XVI Kal. ', 'a.d. XV Kal. ', 'a.d. XVI Kal. ', 'a.d. XV Kal. ', 'a.d. XVI Kal. ', None }, { 'a.d. XV Kal. ', 'a.d. XII Kal. ', 'a.d. XV Kal. ', 'a.d. XIV Kal. ', 'a.d. XV Kal. ', 'a.d. XIV Kal. ', 'a.d. XV Kal. ', 'a.d. XV Kal. ', 'a.d. XIV Kal. ', 'a.d. XV Kal. ', 'a.d. XIV Kal. ', 'a.d. XV Kal. ', None }, { 'a.d. XIV Kal. ', 'a.d. XI Kal. ', 'a.d. XIV Kal. ', 'a.d. XIII Kal. ', 'a.d. XIV Kal. ', 'a.d. XIII Kal. ', 'a.d. XIV Kal. ', 'a.d. XIV Kal. ', 'a.d. XIII Kal. ', 'a.d. XIV Kal. ', 'a.d. XIII Kal. ', 'a.d. XIV Kal. ', None }, { 'a.d. XIII Kal. ', 'a.d. X Kal. ', 'a.d. XIII Kal. ', 'a.d. XII Kal. ', 'a.d. XIII Kal. ', 'a.d. XII Kal. ', 'a.d. XIII Kal. ', 'a.d. XIII Kal. ', 'a.d. XII Kal. ', 'a.d. XIII Kal. ', 'a.d. XII Kal. ', 'a.d. XIII Kal. ', None }, { 'a.d. XII Kal. ', 'a.d. IX Kal. ', 'a.d. XII Kal. ', 'a.d. XI Kal. ', 'a.d. XII Kal. ', 'a.d. XI Kal. ', 'a.d. XII Kal. ', 'a.d. XII Kal. ', 'a.d. XI Kal. ', 'a.d. XII Kal. ', 'a.d. XI Kal. ', 'a.d. XII Kal. ', None }, { 'a.d. XI Kal. ', 'a.d. VIII Kal. ', 'a.d. XI Kal. ', 'a.d. X Kal. ', 'a.d. XI Kal. ', 'a.d. X Kal. ', 'a.d. XI Kal. ', 'a.d. XI Kal. ', 'a.d. X Kal. ', 'a.d. XI Kal. ', 'a.d. X Kal. ', 'a.d. XI Kal. ', None }, { 'a.d. X Kal. ', 'a.d. VII Kal. ', 'a.d. X Kal. ', 'a.d. IX Kal. ', 'a.d. X Kal. ', 'a.d. IX Kal. ', 'a.d. X Kal. ', 'a.d. X Kal. ', 'a.d. IX Kal. ', 'a.d. X Kal. ', 'a.d. IX Kal. ', 'a.d. X Kal. ', None }, { 'a.d. IX Kal. ', 'a.d. VI Kal. ', 'a.d. IX Kal. ', 'a.d. VIII Kal. ', 'a.d. IX Kal. ', 'a.d. VIII Kal. ', 'a.d. IX Kal. ', 'a.d. IX Kal. ', 'a.d. VIII Kal. ', 'a.d. IX Kal. ', 'a.d. VIII Kal. ', 'a.d. IX Kal. ', 'a.d. bis VI Kal. ' }, { 'a.d. VIII Kal. ', 'a.d. V Kal. ', 'a.d. VIII Kal. ', 'a.d. VII Kal. ', 'a.d. VIII Kal. ', 'a.d. VII Kal. ', 'a.d. VIII Kal. ', 'a.d. VIII Kal. ', 'a.d. VII Kal. ', 'a.d. VIII Kal. ', 'a.d. VII Kal. ', 'a.d. VIII Kal. ', 'a.d. VI Kal. ' }, { 'a.d. VII Kal. ', 'a.d. IV Kal. ', 'a.d. VII Kal. ', 'a.d. VI Kal. ', 'a.d. VII Kal. ', 'a.d. VI Kal. ', 'a.d. VII Kal. ', 'a.d. VII Kal. ', 'a.d. VI Kal. ', 'a.d. VII Kal. ', 'a.d. VI Kal. ', 'a.d. VII Kal. ', 'a.d. V Kal. ' }, { 'a.d. VI Kal. ', 'a.d. III Kal. ', 'a.d. VI Kal. ', 'a.d. V Kal. ', 'a.d. VI Kal. ', 'a.d. V Kal. ', 'a.d. VI Kal. ', 'a.d. VI Kal. ', 'a.d. V Kal. ', 'a.d. VI Kal. ', 'a.d. V Kal. ', 'a.d. VI Kal. ', 'a.d. IV Kal. ' }, { 'a.d. V Kal. ', 'pr. Kal. ', 'a.d. V Kal. ', 'a.d. IV Kal. ', 'a.d. V Kal. ', 'a.d. IV Kal. ', 'a.d. V Kal. ', 'a.d. V Kal. ', 'a.d. IV Kal. ', 'a.d. V Kal. ', 'a.d. IV Kal. ', 'a.d. V Kal. ', 'a.d. III Kal. ' }, { 'a.d. IV Kal. ', {}, 'a.d. IV Kal. ', 'a.d. III Kal. ', 'a.d. IV Kal. ', 'a.d. III Kal. ', 'a.d. IV Kal. ', 'a.d. IV Kal. ', 'a.d. III Kal. ', 'a.d. IV Kal. ', 'a.d. III Kal. ', 'a.d. IV Kal. ', 'pr. Kal. ' }, { 'a.d. III Kal. ', {}, 'a.d. III Kal. ', 'pr. Kal. ', 'a.d. III Kal. ', 'pr. Kal. ', 'a.d. III Kal. ', 'a.d. III Kal. ', 'pr. Kal. ', 'a.d. III Kal. ', 'pr. Kal. ', 'a.d. III Kal. ', {} }, { 'pr. Kal. ', {}, 'pr. Kal. ', {}, 'pr. Kal. ', {}, 'pr. Kal. ', 'pr. Kal. ', {}, 'pr. Kal. ', {}, 'pr. Kal. ', {} } } | local dayLookup = { { 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ', 'Kal. ' }, { 'a.d. IV Non. ', 'a.d. IV Non. ', 'a.d. VI Non. ', 'a.d. IV Non. ', 'a.d. VI Non. ', 'a.d. IV Non. ', 'a.d. VI Non. ', 'a.d. IV Non. ', 'a.d. IV Non. ', 'a.d. VI Non. ', 'a.d. IV Non. ', 'a.d. IV Non. ', 'a.d. IV Non. ' }, { 'a.d. III Non. ', 'a.d. III Non. ', 'a.d. V Non. ', 'a.d. III Non. ', 'a.d. V Non. ', 'a.d. III Non. ', 'a.d. V Non. ', 'a.d. III Non. ', 'a.d. III Non. ', 'a.d. V Non. ', 'a.d. III Non. ', 'a.d. III Non. ', 'a.d. III Non. ' }, { 'pr. Non. ', 'pr. Non. ', 'a.d. IV Non. ', 'pr. Non. ', 'a.d. IV Non. ', 'pr. Non. ', 'a.d. IV Non. ', 'pr. Non. ', 'pr. Non. ', 'a.d. IV Non. ', 'pr. Non. ', 'pr. Non. ', 'pr. Non. ' }, { 'Non. ', 'Non. ', 'a.d. III Non. ', 'Non. ', 'a.d. III Non. ', 'Non. ', 'a.d. III Non. ', 'Non. ', 'Non. ', 'a.d. III Non. ', 'Non. ', 'Non. ', 'Non. ' }, { 'a.d. VIII Id. ', 'a.d. VIII Id. ', 'pr. Non. ', 'a.d. VIII Id. ', 'pr. Non. ', 'a.d. VIII Id. ', 'pr. Non. ', 'a.d. VIII Id. ', 'a.d. VIII Id. ', 'pr. Non. ', 'a.d. VIII Id. ', 'a.d. VIII Id. ', 'a.d. VIII Id. ' }, { 'a.d. VII Id. ', 'a.d. VII Id. ', 'Non. ', 'a.d. VII Id. ', 'Non. ', 'a.d. VII Id. ', 'Non. ', 'a.d. VII Id. ', 'a.d. VII Id. ', 'Non. ', 'a.d. VII Id. ', 'a.d. VII Id. ', 'a.d. VII Id. ' }, { 'a.d. VI Id. ', 'a.d. VI Id. ', 'a.d. VIII Id. ', 'a.d. VI Id. ', 'a.d. VIII Id. ', 'a.d. VI Id. ', 'a.d. VIII Id. ', 'a.d. VI Id. ', 'a.d. VI Id. ', 'a.d. VIII Id. ', 'a.d. VI Id. ', 'a.d. VI Id. ', 'a.d. VI Id. ' }, { 'a.d. V Id. ', 'a.d. V Id. ', 'a.d. VII Id. ', 'a.d. V Id. ', 'a.d. VII Id. ', 'a.d. V Id. ', 'a.d. VII Id. ', 'a.d. V Id. ', 'a.d. V Id. ', 'a.d. VII Id. ', 'a.d. V Id. ', 'a.d. V Id. ', 'a.d. V Id. ' }, { 'a.d. IV Id. ', 'a.d. IV Id. ', 'a.d. VI Id. ', 'a.d. IV Id. ', 'a.d. VI Id. ', 'a.d. IV Id. ', 'a.d. VI Id. ', 'a.d. IV Id. ', 'a.d. IV Id. ', 'a.d. VI Id. ', 'a.d. IV Id. ', 'a.d. IV Id. ', 'a.d. IV Id. ' }, { 'a.d. III Id. ', 'a.d. III Id. ', 'a.d. V Id. ', 'a.d. III Id. ', 'a.d. V Id. ', 'a.d. III Id. ', 'a.d. V Id. ', 'a.d. III Id. ', 'a.d. III Id. ', 'a.d. V Id. ', 'a.d. III Id. ', 'a.d. III Id. ', 'a.d. III Id. ' }, { 'pr. Id. ', 'pr. Id. ', 'a.d. IV Id. ', 'pr. Id. ', 'a.d. IV Id. ', 'pr. Id. ', 'a.d. IV Id. ', 'pr. Id. ', 'pr. Id. ', 'a.d. IV Id. ', 'pr. Id. ', 'pr. Id. ', 'pr. Id. ' }, { 'Id. ', 'Id. ', 'a.d. III Id. ', 'Id. ', 'a.d. III Id. ', 'Id. ', 'a.d. III Id. ', 'Id. ', 'Id. ', 'a.d. III Id. ', 'Id. ', 'Id. ', 'Id. ' }, { 'a.d. XIX Kal. ', 'a.d. XVI Kal. ', 'pr. Id. ', 'a.d. XVIII Kal. ', 'pr. Id. ', 'a.d. XVIII Kal. ', 'pr. Id. ', 'a.d. XIX Kal. ', 'a.d. XVIII Kal. ', 'pr. Id. ', 'a.d. XVIII Kal. ', 'a.d. XIX Kal. ', None }, { 'a.d. XVIII Kal. ', 'a.d. XV Kal. ', 'Id. ', 'a.d. XVII Kal. ', 'Id. ', 'a.d. XVII Kal. ', 'Id. ', 'a.d. XVIII Kal. ', 'a.d. XVII Kal. ', 'Id. ', 'a.d. XVII Kal. ', 'a.d. XVIII Kal. ', None }, { 'a.d. XVII Kal. ', 'a.d. XIV Kal. ', 'a.d. XVII Kal. ', 'a.d. XVI Kal. ', 'a.d. XVII Kal. ', 'a.d. XVI Kal. ', 'a.d. XVII Kal. ', 'a.d. XVII Kal. ', 'a.d. XVI Kal. ', 'a.d. XVII Kal. ', 'a.d. XVI Kal. ', 'a.d. XVII Kal. ', None }, { 'a.d. XVI Kal. ', 'a.d. XIII Kal. ', 'a.d. XVI Kal. ', 'a.d. XV Kal. ', 'a.d. XVI Kal. ', 'a.d. XV Kal. ', 'a.d. XVI Kal. ', 'a.d. XVI Kal. ', 'a.d. XV Kal. ', 'a.d. XVI Kal. ', 'a.d. XV Kal. ', 'a.d. XVI Kal. ', None }, { 'a.d. XV Kal. ', 'a.d. XII Kal. ', 'a.d. XV Kal. ', 'a.d. XIV Kal. ', 'a.d. XV Kal. ', 'a.d. XIV Kal. ', 'a.d. XV Kal. ', 'a.d. XV Kal. ', 'a.d. XIV Kal. ', 'a.d. XV Kal. ', 'a.d. XIV Kal. ', 'a.d. XV Kal. ', None }, { 'a.d. XIV Kal. ', 'a.d. XI Kal. ', 'a.d. XIV Kal. ', 'a.d. XIII Kal. ', 'a.d. XIV Kal. ', 'a.d. XIII Kal. ', 'a.d. XIV Kal. ', 'a.d. XIV Kal. ', 'a.d. XIII Kal. ', 'a.d. XIV Kal. ', 'a.d. XIII Kal. ', 'a.d. XIV Kal. ', None }, { 'a.d. XIII Kal. ', 'a.d. X Kal. ', 'a.d. XIII Kal. ', 'a.d. XII Kal. ', 'a.d. XIII Kal. ', 'a.d. XII Kal. ', 'a.d. XIII Kal. ', 'a.d. XIII Kal. ', 'a.d. XII Kal. ', 'a.d. XIII Kal. ', 'a.d. XII Kal. ', 'a.d. XIII Kal. ', None }, { 'a.d. XII Kal. ', 'a.d. IX Kal. ', 'a.d. XII Kal. ', 'a.d. XI Kal. ', 'a.d. XII Kal. ', 'a.d. XI Kal. ', 'a.d. XII Kal. ', 'a.d. XII Kal. ', 'a.d. XI Kal. ', 'a.d. XII Kal. ', 'a.d. XI Kal. ', 'a.d. XII Kal. ', None }, { 'a.d. XI Kal. ', 'a.d. VIII Kal. ', 'a.d. XI Kal. ', 'a.d. X Kal. ', 'a.d. XI Kal. ', 'a.d. X Kal. ', 'a.d. XI Kal. ', 'a.d. XI Kal. ', 'a.d. X Kal. ', 'a.d. XI Kal. ', 'a.d. X Kal. ', 'a.d. XI Kal. ', None }, { 'a.d. X Kal. ', 'a.d. VII Kal. ', 'a.d. X Kal. ', 'a.d. IX Kal. ', 'a.d. X Kal. ', 'a.d. IX Kal. ', 'a.d. X Kal. ', 'a.d. X Kal. ', 'a.d. IX Kal. ', 'a.d. X Kal. ', 'a.d. IX Kal. ', 'a.d. X Kal. ', None }, { 'a.d. IX Kal. ', 'a.d. VI Kal. ', 'a.d. IX Kal. ', 'a.d. VIII Kal. ', 'a.d. IX Kal. ', 'a.d. VIII Kal. ', 'a.d. IX Kal. ', 'a.d. IX Kal. ', 'a.d. VIII Kal. ', 'a.d. IX Kal. ', 'a.d. VIII Kal. ', 'a.d. IX Kal. ', 'a.d. bis VI Kal. ' }, { 'a.d. VIII Kal. ', 'a.d. V Kal. ', 'a.d. VIII Kal. ', 'a.d. VII Kal. ', 'a.d. VIII Kal. ', 'a.d. VII Kal. ', 'a.d. VIII Kal. ', 'a.d. VIII Kal. ', 'a.d. VII Kal. ', 'a.d. VIII Kal. ', 'a.d. VII Kal. ', 'a.d. VIII Kal. ', 'a.d. VI Kal. ' }, { 'a.d. VII Kal. ', 'a.d. IV Kal. ', 'a.d. VII Kal. ', 'a.d. VI Kal. ', 'a.d. VII Kal. ', 'a.d. VI Kal. ', 'a.d. VII Kal. ', 'a.d. VII Kal. ', 'a.d. VI Kal. ', 'a.d. VII Kal. ', 'a.d. VI Kal. ', 'a.d. VII Kal. ', 'a.d. V Kal. ' }, { 'a.d. VI Kal. ', 'a.d. III Kal. ', 'a.d. VI Kal. ', 'a.d. V Kal. ', 'a.d. VI Kal. ', 'a.d. V Kal. ', 'a.d. VI Kal. ', 'a.d. VI Kal. ', 'a.d. V Kal. ', 'a.d. VI Kal. ', 'a.d. V Kal. ', 'a.d. VI Kal. ', 'a.d. IV Kal. ' }, { 'a.d. V Kal. ', 'pr. Kal. ', 'a.d. V Kal. ', 'a.d. IV Kal. ', 'a.d. V Kal. ', 'a.d. IV Kal. ', 'a.d. V Kal. ', 'a.d. V Kal. ', 'a.d. IV Kal. ', 'a.d. V Kal. ', 'a.d. IV Kal. ', 'a.d. V Kal. ', 'a.d. III Kal. ' }, { 'a.d. IV Kal. ', {}, 'a.d. IV Kal. ', 'a.d. III Kal. ', 'a.d. IV Kal. ', 'a.d. III Kal. ', 'a.d. IV Kal. ', 'a.d. IV Kal. ', 'a.d. III Kal. ', 'a.d. IV Kal. ', 'a.d. III Kal. ', 'a.d. IV Kal. ', 'pr. Kal. ' }, { 'a.d. III Kal. ', {}, 'a.d. III Kal. ', 'pr. Kal. ', 'a.d. III Kal. ', 'pr. Kal. ', 'a.d. III Kal. ', 'a.d. III Kal. ', 'pr. Kal. ', 'a.d. III Kal. ', 'pr. Kal. ', 'a.d. III Kal. ', {} }, { 'pr. Kal. ', {}, 'pr. Kal. ', {}, 'pr. Kal. ', {}, 'pr. Kal. ', 'pr. Kal. ', {}, 'pr. Kal. ', {}, 'pr. Kal. ', {} } } | ||
-- if only one argument then not a valid date | |||
if args[1] == nil then return end | if args[1] == nil then return end | ||
-- if two arguments then date without year | |||
if #args[1] == 2 then | if #args[1] == 2 then | ||
local MonthDay = {tonumber(args[1][1]), tonumber(args[1][2])} | local MonthDay = {tonumber(args[1][1]), tonumber(args[1][2])} | ||
Line 83: | Line 84: | ||
return day .. months.accusative[MonthDay[1]] | return day .. months.accusative[MonthDay[1]] | ||
end | end | ||
-- if 3 arguments then date with year-month-day | |||
elseif #args[1] == 3 then | elseif #args[1] == 3 then | ||
local YearMonthDay = {tonumber(args[1][1]), tonumber(args[1][2]), tonumber(args[1][3])} | local YearMonthDay = {tonumber(args[1][1]), tonumber(args[1][2]), tonumber(args[1][3])} | ||
Line 115: | Line 117: | ||
end | end | ||
return day .. months.accusative[MonthDay[1] + 1] .. ' ' .. numeral.main({YearMonthDay[1]+avc}) .. ' AVC' | return day .. months.accusative[MonthDay[1] + 1] .. ' ' .. numeral.main({YearMonthDay[1]+avc}) .. ' AVC' | ||
end | |||
if tonumber(MonthDay[1]) == 13 then | |||
MonthDay[1] = 2 | |||
end | end | ||
return day .. months.accusative[MonthDay[1]] .. ' ' .. numeral.main({YearMonthDay[1]+avc}) .. ' AVC' | return day .. months.accusative[MonthDay[1]] .. ' ' .. numeral.main({YearMonthDay[1]+avc}) .. ' AVC' | ||
Line 136: | Line 141: | ||
end | end | ||
else | else | ||
origArgs = frame | origArgs = frame['args'] | ||
end | end | ||
-- Trim whitespace and remove blank arguments. | -- Trim whitespace and remove blank arguments. |