Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how do i add the st,nd,rd or th at the end of a date month?

so when using os.date I want it to print something like this : --> August 25th the code I am using right now is :

print(os.date("%B %d", os.time()))

the problem with this is that it prints August 25 and not August 25th anybody know how to get the "st", "nd", "rd", or "th" at the end of a month date

1 answer

print(os.date("%B %d", os.time())..'th')

lmao? Just concatenation needed ".." followed by "th", you can use string.sub to get the numbers and check whether to put st nd rd or th

This discussion is preserved as it was. New answers, comments, and votes are closed.