Interested in improving this site? Please check the To Do page.
date.seconds
Extracts the seconds (0-59) from the date.
Syntax
date.seconds (date)
Params
date is optional. It can be a valid Frontier date, or anything that can be coerced to a date (like a string or a number). If omitted, then the current date is used as would be returned by clock.now()
Returns
A number, the seconds portion of the date (0-59)
Examples
date.seconds ()
» 42
date.seconds ("9/9/1972; 6:53:27 PM")
» 27
date.seconds (934878454)
» 34
date.seconds (clock.now ())
» 42
Notes
If the date parameter is not actually a date, and can not be coerced to a date, you will often get a bogus result. For example, on the Macintosh:
date.hour( "this is not a date" ) » 0
That should have generated an error, but didn’t. However, this bug is inherited from the date() verb, which returns bogus values from bogus input.