TimeDelta

data class TimeDelta(val days: Int, val hours: Int, val minutes: Int, val seconds: Int, val totalSeconds: Long)(source)

Represents the components of a time delta.

Constructors

Link copied to clipboard
constructor(days: Int, hours: Int, minutes: Int, seconds: Int, totalSeconds: Long)

Properties

Link copied to clipboard
val days: Int
Link copied to clipboard
val hours: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Formats a TimeDelta as a verbose string showing all non-zero components. Example: delta.toLongString() → "65 days, 3 hours"

Link copied to clipboard

Formats a TimeDelta showing only the two most significant components. Example: delta.toShortString() → "2 months, 5 days"