Module:Sandbox/Trappist the monk/as of

--[[

use Module:Citation/CS1/Configuration to tell the article date format which cs1|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'. In this module, the suffix is ignored. When the article doesn't have a template, ~/Configuration returns nil.

When article format is 'dmy', this module returns an enpty string. When article format is 'mdy', the module translates that to 'us' and returns that string.

]]

local df = mw.loadData ('Module:Citation/CS1/Configuration').global_df;

--[[--< M A I N >--

]]

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 { main = main }