LyDateTime - Ly Framework - Gamely

Adds Date and Time Functions to Crayta.
To access it from every script using Ly.DateTime LyFramework with properly setupped LyRequire is needed.
After installing you need to add it to LyFramework subfolder lib see LyRequire Documentation.

Made to work with Crayta World:GetUTCTime()

  • GetWeekDay(seconds) index of the weekday
  • GetTime(seconds) returns hours , minutes, seconds
  • GetDate(seconds) returns day, month, year

Planned features:

  • Date and Time calculations. e.g. adding days to a date.
local w = GetWorld()
local dateTime = Ly.DateTime
local seconds = w:GetUTCTime()
local hours, minutes, sec = dateTime.GetTime(seconds)
local day, month, year = dateTime.GetDate(seconds)
print(hours..":"..minutes)
print(day.."/"..month.."/"..year)