Modul:Citation/CS1/Date validation/sandkasse: Forskelle mellem versioner

Content deleted Content added
Lidt hjælpetekst
Eksempler på datoer
Linje 1.085:
for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list
if is_set(param_val.val) then
if not param_val.val:match ('^[1-9]%d%d%d *%- *[1-9]%d%d%d') and -- MGA73: .val fx 1995-1996
not param_val.val:match ('%d%d%d%d%-%d%d%-%d%d') and -- MGA73: .val fx 2020-12-25
not param_val.val:match ('%d%d%-%d%d%-%d%d%d%d') and -- MGA73: .val fx 05-02-2021
not param_val.val:match ('%d%d?%/%d%d?[%s-]%d%d%d%d') then -- MGA73: .val fx 1/2-1986
param_val.val, n = param_val.val:gsub ('%-', ' – '); -- MGA73: .val x 2 -- replace any hyphen with ndash
if 0 ~= n then