Skip to content

What is the best way to type cast os.date('%Y') return value as integer? #216

Answered by RaycatWhoDat
stefanos82 asked this question in Q&A
Discussion options

You must be logged in to vote
require 'os'

local year: int64 = tonumber(os.date('%Y'))
print(year)

?

Also, you'll probably get a faster response in the Discord.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@stefanos82
Comment options

Answer selected by stefanos82
Comment options

You must be logged in to vote
5 replies
@RaycatWhoDat
Comment options

@stefanos82
Comment options

@stefanos82
Comment options

@RaycatWhoDat
Comment options

@stefanos82
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants