object Seconds extends Serializable

Source
Seconds.scala
Linear Supertypes
Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Seconds
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. val ZERO: Seconds

    Constant representing zero seconds.

  2. def between(startInclusive: Temporal, endInclusive: Temporal): Seconds

    Creates a Seconds representing the number of whole seconds between the two specified datetimes.

    Creates a Seconds representing the number of whole seconds between the two specified datetimes.

    startInclusive

    the start instant, must not be null

    endInclusive

    the end instant, must not be null

    returns

    the period in seconds

    Exceptions thrown

    IllegalArgumentException if the instants are null or invalid

  3. implicit def fromDurationToSecond(duration: Duration): Seconds

    implicit that will only use the seconds part of a duration

  4. def ofDuration(duration: Duration): Seconds

    Obtains an instance of Seconds.

    Obtains an instance of Seconds. This will actually only use the seconds of a java.time.Duration.

    duration

    the duration

    returns

    the instance of Seconds

  5. def parse(periodStr: String): Seconds

    Creates a new Seconds by parsing a string in the ISO8601 format 'PTnS'.

    Creates a new Seconds by parsing a string in the ISO8601 format 'PTnS'.

    The parse will accept the full ISO syntax of PnYnMnWnDTnHnMnS however only the seconds component may be non-zero. If any other component is non-zero, an exception will be thrown.

    periodStr

    the period string, null returns zero

    returns

    the period in seconds

    Exceptions thrown

    IllegalArgumentException if the string format is invalid

  6. def seconds(seconds: Long): Seconds

    Obtains an instance of Seconds.

    Obtains an instance of Seconds.

    seconds

    the number of seconds to obtain an instance for

    returns

    the instance of Seconds