Editing
Module:PageDates
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} -- Properly handle ordinal suffixes local function ordinal(n) local v = n % 100 if v >= 11 and v <= 13 then return n .. "th" end local lastDigit = n % 10 if lastDigit == 1 then return n .. "st" elseif lastDigit == 2 then return n .. "nd" elseif lastDigit == 3 then return n .. "rd" else return n .. "th" end end function p.dates(frame) local lang = mw.language.getContentLanguage() local timestamp = frame:preprocess("{{REVISIONTIMESTAMP}}") -- Extract date parts local day = tonumber(lang:formatDate("j", timestamp)) local month = lang:formatDate("F", timestamp) local year = lang:formatDate("Y", timestamp) local formatted = string.format("%s %s, %s", month, ordinal(day), year) return formatted end return p
Summary:
Please note that all contributions to HighSpell Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
HighSpell Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:PageDates/doc
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Module
Discussion
English
Views
Read
Edit
View history
More
Purge cache
Search
Discord
Discord
Navigation
Main page
Wiki policies
Style guide
Recent changes
Random page
HighSpell
Bestiary
Equipment
Quests
Skills
Shops
Game Maps
Overworld
Underground
Tools
What links here
Related changes
Special pages
Page information
Cargo data