User Tools

Site Tools


script:world_event:getdatefromtime

getDateFromTime

  • Parameters and types:
    • time: numbertimestamp
    • enum: numberenumeration value (EVENTDATE) EVENTDATE
  • Return value and type:
    • code: numberSuccess (ErrorCode.OK) ErrorCode
    • ret: numbertime value
  • The main function of this method: Convert timestamp to time unit
  • The specific use cases are as follows:
local code, ret = World:getDateFromTime(time, enum)
if code == ErrorCode.OK then
print('Execution successful', code, ret )
else
print('Execution failed')
end
script/world_event/getdatefromtime.txt · Last modified: 2024/06/09 08:12 by don