DurationScrewdriver extension

provides extensions for Duration.

on

Properties

absoluteHours int
Returns remaining minutes after deriving days.
no setter
absoluteMinutes int
Returns remaining minutes after deriving hours.
no setter
absoluteSeconds int
Returns remaining minutes after deriving minutes.
no setter
after DateTime
Returns DateTime that is before this duration.
no setter
ago DateTime
Returns DateTime that is before this duration.
no setter
fromNow DateTime
Alias for after
no setter
inYears int
Returns the number of whole years spanned by this Duration. Please note that this does not account for leap year.
no setter
isInDays bool
Returns true if this duration equals to or more than a day.
no setter
isInHours bool
Returns true if this duration equals to or more than an hour but is less than a day.
no setter
isInMillis bool
Returns true if this duration equals to or more than a millisecond but is less than a second.
no setter
isInMinutes bool
Returns true if this duration equals to or more than a minute but is less than an hour.
no setter
isInSeconds bool
Returns true if this duration equals to or more than a second but is less than a minute.
no setter
isInYears bool
Returns true if this duration equals to or more than a year.
no setter