Módulo:Citas: Diferenzas entre revisións

Contido eliminado Contido engadido
Banjo (conversa | contribucións)
sincronización dende /probas
Banjo (conversa | contribucións)
Sen resumo de edición
Liña 2.388:
Date validation supporting code is in Module:Citation/CS1/Date_validation
]]
-- do -- create defined block to contain local variables error_message, date_parameters_list, mismatch
-- local error_message = '';
-- AirDate has been promoted to Date so not necessary to check it
-- local date_parameters_list = {['access-date']=AccessDate, ['archive-date']=ArchiveDate, ['date']=Date, ['doi-broken-date']=DoiBroken,
-- ['embargo']=Embargo, ['lay-date']=LayDate, ['publication-date']=PublicationDate, ['year']=Year};
--
 
-- anchor_year, Embargo, error_message = dates(date_parameters_list, COinS_date);
--
 
-- if is_set (Year) and is_set (Date) then -- both |date= and |year= not normally needed;
-- local mismatch = year_date_check (Year, Date)
-- if 0 == mismatch then -- |year= does not match a year-value in |date=
-- if is_set (error_message) then -- if there is already an error message
-- error_message = error_message .. ', '; -- tack on this additional message
-- end
-- error_message = error_message .. '|year= / |date= mismatch';
-- elseif 1 == mismatch then -- |year= matches year-value in |date=
-- -- add_maint_cat ('date_year');
-- end
-- end
--
-- if not is_set(error_message) then -- error free dates only
-- local modified = false; -- flag
-- if is_set (DF) then -- if we need to reformat dates
-- modified = reformat_dates (date_parameters_list, DF, false); -- reformat to DF format, use long month names if appropriate
-- end
--
 
-- if true == date_hyphen_to_dash (date_parameters_list) then -- convert hyphens to dashes where appropriate
-- modified = true;
-- -- add_maint_cat ('date_format'); -- hyphens were converted so add maint category
-- end
-- if modified then -- if the date_parameters_list values were modified
-- AccessDate = date_parameters_list['access-date']; -- overwrite date holding parameters with modified values
-- ArchiveDate = date_parameters_list['archive-date'];
-- Date = date_parameters_list['date'];
-- DoiBroken = date_parameters_list['doi-broken-date'];
-- LayDate = date_parameters_list['lay-date'];
-- PublicationDate = date_parameters_list['publication-date'];
-- end
-- else
---- table.insert( z.message_tail, { set_error( 'bad_date', {error_message}, true ) } ); -- add this error message
-- end
 
-- if is_set(error_message) then
Liña 2.443:
-- end
-- end
-- end -- end of do
 
-- Account for the oddity that is {{cite journal}} with |pmc= set and |url= not set. Do this after date check but before COInS.