Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you get the current year?

Asked by 3 years ago

Simple question:

How do I get the current year?

For example, its currently 2021.

0
The site is not meant for code request actually try first. vincentthecat1 199 — 3y
0
I did, I cant get anything working wwwaylon09 113 — 3y
0
Ive tried os.time and DateTime wwwaylon09 113 — 3y

1 answer

Log in to vote
4
Answered by
appxritixn 2235 Moderation Voter Community Moderator
3 years ago

Use os.date()

os.date("%Y") -- returns the current year
0
MY LORD AND SAVIOR HAS ARIVED wwwaylon09 113 — 3y
Ad

Answer this question