မော်ဂျူး:Effective protection expiry

Documentation icon မော်ဂျူးမှတ်တမ်းလက်စွဲ
local p = {}-- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known.-- If no title is specified, the title of the page being displayed is used.function p._main(action, pagename)local titleif type(pagename) == 'table' and pagename.prefixedText thentitle = pagenameelseif pagename thentitle = mw.title.new(pagename)elsetitle = mw.title.getCurrentTitle()endpagename = title.prefixedTextif action == 'autoreview' thenlocal stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title)return stabilitySettings and stabilitySettings.expiry or 'unknown'elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' thenerror( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )endlocal rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename)if rawExpiry == 'infinity' thenreturn 'infinity'elseif rawExpiry == '' thenreturn 'unknown'elselocal year, month, day, hour, minute, second = rawExpiry:match('^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$')if year thenreturn string.format('%s-%s-%sT%s:%s:%s',year, month, day, hour, minute, second)elseerror('internal error in Module:Effective protection expiry; malformed expiry timestamp')endendendsetmetatable(p, { __index = function(t, k)return function(frame)return t._main(k, frame.args[1])endend })return p
🔥 Top keywords: ဗဟိုစာမျက်နှာအထူး:ရှာဖွေရန်ဘက္ကရီအီးဒ်အောင်ဆန်းအောင်ဆန်းစုကြည်မြန်မာပြည်ဂျပန်နိုင်ငံဒုတိယ ကမ္ဘာစစ်ပုဂံမြန်မာအမျိုးသမီးများနေ့မြန်မာနိုင်ငံကျန်စစ်သားမူးယစ်ဆေးဝါးမေတ္တသုတ်ကားလိုး ကော်လိုဒီထိုင်းနိုင်ငံပဋ္ဌာန်းမဟာသမယသုတ်ဂေါတမဗုဒ္ဓပီမိုးနင်းသိပ္ပံပညာအလောင်းမင်းတရားအာဇာနည်နေ့စင်ကာပူနိုင်ငံတပ်မတော်ရွှေတိဂုံစေတီတော်မင်းအောင်လှိုင်အနော်ရထာကမ္ဘောဒီးယားနိုင်ငံသောမတ် အက်ဒီဆင်ဘုရင့်နောင်အဲလ်ဘတ် အိုင်းစတိုင်းအော်ကာမြန်မာတိုင်းရင်းသားမျိုးနွယ်များတပ်မတော် (ကြည်း)အပြည်ပြည်ဆိုင်ရာ အမျိုးသမီးများနေ့အရှေ့တောင်အာရှနိုင်ငံများအသင်းသမုဒ္ဒရာကျိုက်ထီးရိုးဘုရား