模块:Citation/CS1/Date validation:修订间差异

imported>Liangent
无编辑摘要
imported>Liangent
无编辑摘要
第238行: 第238行:
return false;
return false;
end
end
anchor_year = year;


-- LOCAL
-- LOCAL
第244行: 第245行:
month = get_month_number (month);
month = get_month_number (month);
if 0 == month then return false; end
if 0 == month then return false; end
anchor_year = year;


elseif mw.ustring.match(date_string, "^[1-9]%d%d%d年[1-9]%d?月$") then -- zh: year month
elseif mw.ustring.match(date_string, "^[1-9]%d%d%d年[1-9]%d?月$") then -- zh: year month
第249行: 第251行:
month = get_month_number (month);
month = get_month_number (month);
if 0 == month then return false; end
if 0 == month then return false; end
anchor_year = year;


elseif date_string:match("^[1-9]%d%d%d?年$") then -- zh: year; here accept either YYY or YYYY
elseif date_string:match("^[1-9]%d%d%d?年$") then -- zh: year; here accept either YYY or YYYY
第255行: 第258行:
return false;
return false;
end
end
anchor_year = year;
-- END LOCAL
-- END LOCAL