Skip to main content

sc.time

A Time module that allows you to format time differently


Functions

formatEpoch

sc.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 months
  • [ number ] Total years

formatHours

sc.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

sc.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

sc.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