Home  Contents

datetime:base90

Date/Time Core4 Lua Commands

SYNOPSIS

  1. days, minutess = datetime:base90()
  2. datetime:setBase90(days, minutes)

DESCRIPTION

Older Teratronik systems often handle dates as an offset from 1990, Jan. 1st and times as the number of minutes since midnight. These functions are used to set and get this datetime format.

RETURN VALUE

datetime:base90() returns the number of days since 1990-01-01 and the number of minutes since midnight.

ERRORS

Raises an error if datetime is not a datetime instance.

EXAMPLE

>  > 
d = clock.newDatetime(2005, 03, 18, 1, 58, 31) print(d, d:base90())
2005-03-18T01:58:31 5555 118

SEE ALSO