Module:Param Parse: Difference between revisions

Release
(release)
(Release)
Line 160:
 
-- Release
function parse.release_smwunix_time(date)
-- Convert a time to unix time
if date == nil then
return nil
Line 171 ⟶ 172:
end
function parse.release_func(date)
local time = unix_time(date)
if datetime == nil then
return nil
end
local unix_timeformatted_date = parseos.release_smw(date('%Y %B %d', time)
formatted_date = string.gsub(formatted_date, ' 0', ' ') -- Convert 2024 January 01 to 2024 January 1
if unix_time == nil then
return nil
end
function parse.release_smw(date)
return os.date("%Y %B %d", unix_time)
return unix_time(date)
end
parse.release = {
name = 'release',
func = parse.release_func,
category_incomplete = 'Needs release date',
smw_property = 'Release Date',
smw_func = parse.release_smw,