IntExtensions extension

on

Methods

days() Duration

Available on int, provided by the IntExtensions extension

Returns a Duration representing days.
hours() Duration

Available on int, provided by the IntExtensions extension

Returns a Duration representing hours.
lastDigits(int n) int

Available on int, provided by the IntExtensions extension

Retrieves the last n digits of the integer.
microseconds() Duration

Available on int, provided by the IntExtensions extension

Returns a Duration representing microseconds.
milliseconds() Duration

Available on int, provided by the IntExtensions extension

Returns a Duration representing milliseconds.
minutes() Duration

Available on int, provided by the IntExtensions extension

Returns a Duration representing minutes.
months() Duration

Available on int, provided by the IntExtensions extension

Returns a Duration approximating months (30 days per month).
seconds() Duration

Available on int, provided by the IntExtensions extension

Returns a Duration representing seconds.
toBool([int value = 1]) bool

Available on int, provided by the IntExtensions extension

Converts the integer to a boolean.
toOrdinal([String space = '']) String

Available on int, provided by the IntExtensions extension

Converts an integer to an ordinal representation (e.g., 1st, 2nd, 3rd).
toRoman() String

Available on int, provided by the IntExtensions extension

Converts the integer to Roman numerals (supports values from 1 to 3999).
toWords() String

Available on int, provided by the IntExtensions extension

Converts the integer to words (supports up to 999,999,999,999).
validate({int value = 0}) int

Available on int, provided by the IntExtensions extension

Validates the integer and returns the default value if it is null.
weeks() Duration

Available on int, provided by the IntExtensions extension

Returns a Duration representing weeks.
years() Duration

Available on int, provided by the IntExtensions extension

Returns a Duration approximating years (365 days per year).