Changes

724 bytes added ,  02:57, 15 October 2018
no edit summary
Line 5: Line 5:  
end
 
end
   −
return p
+
local Date = require('Module:Date')._Date
 +
 
 +
local show  -- function defined below to display results
 +
 
 +
local function current_date()
 +
local now_date = Date('currentdate')
 +
local now_datetime = Date('currentdatetime')
 +
show('Current date showing when this page was last purged',
 +
now_date:text(),                -- 7 March 2016 (for example)
 +
now_date:text('mdy'),          -- March 7, 2016
 +
now_date:text('ymd'),          -- 2016-03-07
 +
now_date:text('%A %-d %B %-Y'), -- Monday 7 March 2016
 +
now_datetime:text(),            -- 21:32:45 7 March 2016
 +
now_datetime:text('hms'),      -- 21:32:45
 +
now_datetime:text('%c')        -- 9:32 pm 7 March 2016
 +
)
 +
end
 +
 
 +
local function main()
 +
current_date()
 +
end
 +
 
 +
return { main = main }