Home  Contents

Offset from Midnight

Date/Time Core4 Lua Commands

SYNOPSIS

  1. n = time:minutesFromMidnight()
  2. n = time:secondsFromMidnight()
  3. n = time:millisecondsFromMidnight()

DESCRIPTION

Calculates the elapsed time as seen from midnight.

RETURN VALUE

Returns a number indicating how many minutes, seconds or milliseconds the stored time is away from midnight, respectively.

ERRORS

Raises an error if time is not a time instance.

EXAMPLE

>  > 
t = clock.newTime(1, 30, 0) print(t:minutesFromMidnight())
90

SEE ALSO