View source for Module:Age

Jump to: navigation, search

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

  • The action you have requested is limited to users in the group: Users.
  • This page has been protected to prevent editing or other actions.

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:
הההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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:Age.