View source for Module:Age
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
-- Taken from http://en.wikipedia.org/wiki/Module:Age
--[[ Code for some date functions, including implementations of:
{{Age in days}} age_days
{{Age in years and months}} age_ym
{{Gregorian serial date}} gsd_ymd
Calendar functions will be needed in many areas, so this may be superseded
by some other system, perhaps using PHP functions accessed via mw.
]]
local utils = require ('Module:Utils')
local MINUS = '−' -- Unicode U+2212 MINUS SIGN
local function number_name(number, singular, plural, sep)
-- Return the given number, converted to a string, with the
-- separator (default space) and singular or plural name appended.
plural = plural or (singular .. 's')
sep = sep or ' '
return tostring(number) .. sep .. ((number == 1) and singular or plural)
-- this uses an interesting trick of Lua:
000
1:0
Template used on this page:
Return to Module:Age.