Modul:Stranica za vježbanje

Izvor: Wikipedija


local p = {}
local hrv = mw.language.getContentLanguage()

function p.vjezba(frame)
 -- molimo ne mijenjajte linije iznad
 -- ispod pišite svoj kod
    
    local A = "\nA: Glasovanje završava za "
    local N = "\nN: Vrijeme do kraja glasovanja jest "
    local tbl = mw.html.create( 'table' )
    local sve = mw.html.create()
    sve:tag( 'div' ):wikitext(A .. hrv:formatDuration(15*3600+31*60+21, {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'div' ):wikitext(A .. hrv:formatDuration(20*3600+32*60+21, {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'div' ):wikitext(A .. hrv:formatDuration(21*3600+34*60+22, {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'div' ):wikitext(A .. hrv:formatDuration(22*3600+31*60+25, {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'div' ):wikitext(A .. hrv:formatDuration(25*3600+31*60+21,  {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'div' ):wikitext(A .. hrv:formatDuration(51*3600+31*60+21,  {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'hr' ):done()
       :tag( 'div' ):wikitext(N .. hrv:formatDuration(15*3600+31*60+21, {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'div' ):wikitext(N .. hrv:formatDuration(20*3600+32*60+21, {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'div' ):wikitext(N .. hrv:formatDuration(21*3600+34*60+22, {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'div' ):wikitext(N .. hrv:formatDuration(22*3600+31*60+25, {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'div' ):wikitext(N .. hrv:formatDuration(25*3600+31*60+21,  {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
       :tag( 'div' ):wikitext(N .. hrv:formatDuration(51*3600+31*60+21,  {'days', 'hours', 'minutes', 'seconds'}, True) ):done()
    mw.log(sve)
    return sve
	
 --ne mijenjajte linije ispod	
end
return p