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

Content deleted Content added
Copy from en.wiki
ændring som kan håndtere ca.
Linje 746:
if is_set(v.val) then -- if the parameter has a value
v.val = mw.ustring.gsub(v.val, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9
if v.val:match("^cca?%. [1-9]%d%d%d?%a?$") then -- special case for c. year or with or without CITEREF disambiguator - only |date= and |year=
local year = v.val:match("cca?%. ([1-9]%d%d%d?)%a?"); -- get the year portion so it can be tested
if 'date' == k then
anchor_year, COinS_date = v.val:match("((cca?%. [1-9]%d%d%d?)%a?)"); -- anchor year and COinS_date only from |date= parameter
good_date = is_valid_year(year);
elseif 'year' == k then