FANDOM


  • Why do the week numbers for MediaWiki and Lua differ? In Lua os.date( "%W" ) yields 0, while {{CURRENTWEEK}} yields 52. Do I have to expand that magic word (if that even works) in Lua to get MediaWiki's week number?

      Loading editor
    • os.date isn't really the right set of functions unless you're at the bare-metal of the OS; it also can't take %W as a parameter. Even the magic word is not right on a global scale.

      What you really want is Lua's lang:formatDate or the ParserFunctions equivalent #time

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+