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

clock.currentTime, clock.newTime, time(), time:addMSecs, time:addSecs, time:format, time:hour, time:isNull, time:isValid, time:minute, time:msec, time:msecsTo, time:second, time:secsTo, time:set, tostring(time)