Jump to content

Module:Sandbox/Trappist the monk/as of

From Wikipedia, the free encyclopedia
--[[use Module:Citation/CS1/Configuration to tell {{as of}} the article date format which cs1|2 gets from one of the{{use xxx dates}} 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 {{use xxx dates}} parameter |cs1-dates= or 'all'. Inthis module, the suffix is ignored. When the article doesn't have a {{use xxx dates}} 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.]]localdf=mw.loadData('Module:Citation/CS1/Configuration').global_df;--[[--------------------------< M A I N >----------------------------------------------------------------------{{#invoke:Sandbox/Trappist the monk/as of|main}}]]localfunctionmain()ifdfanddf:match('^mdy')thenreturn'us';-- translate 'mdy' to 'us'endreturn'';-- format is dmy or no {{use xxx dates}} templateend--[[--------------------------< E X P O R T E D _ F U N C T I O N S >------------------------------------------]]return{main=main}
close