Modul:Age: Unterschied zwischen den Versionen

261 Bytes hinzugefügt ,  vor 5 Jahren
update from sandbox: Template:Death date and age now gives an error if the death date is in future by more than one day
(update from sandbox: Template:Death date and age now gives an error if the death date is in future by more than one day)
Zeile 9: Zeile 9:
['mt-conflicting-show'] =      'Parameter show=$1 conflicts with round=$2',
['mt-conflicting-show'] =      'Parameter show=$1 conflicts with round=$2',
['mt-date-wrong-order'] =      'The second date must be later in time than the first date',
['mt-date-wrong-order'] =      'The second date must be later in time than the first date',
['mt-dd-future'] =              'Death date (first date) must not be in the future',
['mt-dd-wrong-order'] =        'Death date (first date) must be later in time than the birth date (second date)',
['mt-dd-wrong-order'] =        'Death date (first date) must be later in time than the birth date (second date)',
['mt-invalid-bd-age'] =        'Invalid birth date for calculating age',
['mt-invalid-bd-age'] =        'Invalid birth date for calculating age',
Zeile 923: Zeile 924:
if diff.isnegative then
if diff.isnegative then
return message('mt-dd-wrong-order')
return message('mt-dd-wrong-order')
end
local Date = getExports(frame)
local today = Date('currentdate') + 1  -- one day in future allows for timezones
if date1 > today then
return message('mt-dd-future')
end
end
local years
local years
Anonymer Benutzer