How do i get the os year?

This category should only be used for open discussions on Roblox development!
i never worked with the OS before it’s my first time so i don’t know much about it so i typed os.year in the game and there’s no function how would i go about getting the year?
Does anyone know how i would go about getting the os.year because when i type it into roblox studio there’s no function for it i’m just trying to get the current year 2022. how do i get the year?

os.year
1 Like
local CurrentYear = os.date("%Y")
print(CurrentYear) -- 2022
1 Like