--2 gets from one of the templates. The date format string returned from ~/Configuration is either of 'dmy' or 'mdy'with a suffix. The suffix is either the content of the parameter |cs1-dates= or 'all'. Inthis module, the suffix is ignored. When the article doesn't have a template, ~/Configurationreturns nil.
When article format is 'dmy', this module returns an enpty string. When article format is 'mdy', the moduletranslates that to 'us' and returns that string.
local df = mw.loadData ('Module:Citation/CS1/Configuration').global_df;
--main}}
local function main if df and df:match ('^mdy') then return 'us'; -- translate 'mdy' to 'us' end return ; -- format is dmy or no template end
----------------------------< E X P O R T E D _ F U N C T I O N S >------------------------------------------
return