Skip to main content

Time

A Time module that allows you to format time differently


Functions

formatEpoch

sm.scrapcomputers.time.formatEpoch( epoch )

Formats an EPOCH to SS, MM, HH, DD, MM, YYYY

Arguments:

  • epoch [ number ] The epoch time.

Returns:

  • [ number ] Total seconds
  • [ number ] Total minutes
  • [ number ] Total hours
  • [ number ] Total days
  • [ number ] Total monthhs
  • [ number ] Total years

formatHours

sm.scrapcomputers.time.formatHours( hours )

Formats hours to SS, MM, HH

Arguments:

  • hours [ number ] The hours to format.

Returns:

  • [ number ] Total seconds
  • [ number ] Total minutes
  • [ number ] Total hours

formatMinutes

sm.scrapcomputers.time.formatMinutes( minutes )

Formats minutes to SS, MM, HH

Arguments:

  • minutes [ number ] The minutes to format.

Returns:

  • [ number ] Total seconds
  • [ number ] Total minutes
  • [ number ] Total hours

formatSeconds

sm.scrapcomputers.time.formatSeconds( seconds )

Formats seconds to SS, MM, HH

Arguments:

  • seconds [ number ] The seconds to format.

Returns:

  • [ number ] Total seconds
  • [ number ] Total minutes
  • [ number ] Total hours