Last 5 Pages Viewed: Template talk:Noitalic » Module:Wd/i18n » Template:Being deleted » Special:PrefixIndex/User:2600:1012:B14B:... » Special:WhatLinksHere/Template:Cs2

View source for Module:YMD to ISO

Jump to navigation Jump to search

You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: Users.


You can view and copy the source of this page.

local p = {}
local function month_number(month_name)
local months_full = {january=1, february=2, march=3, april=4, may=5, june=6, july=7, august=8, september=9, october=10, november=11, december=12}
local months_abbr = {jan=1, feb=2, mar=3, apr=4, may=5, jun=6, jul=7, aug=8, sep=9, oct=10, nov=11, dec=12}
local month_lc, _ = string.gsub(string.lower(month_name),'%.','',1)
local month_num = months_full[month_lc] or months_abbr[month_lc] or 0
if month_lc == 'sept' then
month_num = 9
end
return month_num
end
local function days_in_month(month_num,year)
-- modified from code in Module:Citation/CS1/Date_validation
local days = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
local month_length
if month_num == 2 then -- February: 28 days, unless leap year
month_length = 28
if year <= 1582 then -- Julian calendar before Oct 1582
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Template used on this page:

Return to Module:YMD to ISO.