Package-level declarations

Properties

Link copied to clipboard
val Int.dayDuration: Duration
val Long.dayDuration: Duration
Link copied to clipboard
val Duration.days: Long
Link copied to clipboard
val DateTime.daysAgo: Int
Link copied to clipboard
val Period.duration: Duration
Link copied to clipboard
val emptyDuration: Duration

empty Duration

Link copied to clipboard
val EPOCH: DateTime
Link copied to clipboard
val Int.hourDuration: Duration
val Long.hourDuration: Duration
Link copied to clipboard
val Duration.hours: Long
Link copied to clipboard
val DateTime.hoursAgo: Int
Link copied to clipboard
val DateTime.isToday: Boolean
Link copied to clipboard
val Duration.isZero: Boolean
Link copied to clipboard
val Int.milliDuration: Duration
val Long.milliDuration: Duration
Link copied to clipboard
val Int.minuteDuration: Duration
val Long.minuteDuration: Duration
Link copied to clipboard
val Duration.minutes: Long
Link copied to clipboard
val DateTime.minutesAgo: Int
Link copied to clipboard
val DateTime.monthsAgo: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val Int.secondDuration: Duration
val Long.secondDuration: Duration
Link copied to clipboard
val Duration.seconds: Long
Link copied to clipboard
val DateTime.secondsAgo: Int
Link copied to clipboard
val DateTime.yearsAgo: Int

Functions

Link copied to clipboard
fun Duration.absoluteDuration(): Duration

absolute duration

Link copied to clipboard
fun Duration.afterEpoch(): DateTime

get DateTime from EPOCH + duration

Link copied to clipboard
fun Period.ago(): DateTime

current time - specified period

Link copied to clipboard
fun Duration.agoNow(): DateTime

get DateTime from current time - duration

Link copied to clipboard
fun DateTime.asLocal(tz: DateTimeZone = DateTimeZone.getDefault()): DateTime

Convert DateTime timezone to specified time zone. not specified to system default time zone

Link copied to clipboard
fun DateTime.asUtc(): DateTime

Convert DateTime timezone to UTC

Link copied to clipboard
fun Period.before(moment: DateTime): DateTime
Link copied to clipboard
fun dateTimeFormat(pattern: String): DateTimeFormatter

get DateTimeFormatter with specified pattern

Link copied to clipboard
fun dateTimeFromJson(json: String): DateTime

Convert json text to DateTime

Link copied to clipboard
fun dateTimeOf(year: Int, month: Int = 1, day: Int = 1, hours: Int = 0, minutes: Int = 0, seconds: Int = 0, millis: Int = 0): DateTime

Build DateTime

Link copied to clipboard
fun AbstractInstant.dateTimeUTC(): DateTime

Convert Instant to DateTime with TimeZone UTC

Link copied to clipboard
fun dayDurationOf(days: Long): Duration

duration of days

Link copied to clipboard
fun DateTime.dayInterval(days: Int = 1): Interval

Get day interval in specified DateTime

Link copied to clipboard
fun Int.days(): Period

Period in N days

fun Long.days(): Period

N days period

Link copied to clipboard
fun Duration.diff(other: Duration): Duration

difference duration with other duration

Link copied to clipboard
operator fun Duration.div(divisor: Long): Duration
Link copied to clipboard
fun Period.from(moment: DateTime): DateTime
Link copied to clipboard
fun Duration.fromNow(): DateTime

get DateTime from current time + duration

Link copied to clipboard
fun hourDurationOf(hours: Long): Duration

duration of hours

Link copied to clipboard
fun DateTime.hourInterval(hours: Int = 1): Interval
Link copied to clipboard
fun Int.hours(): Period

N Hours

fun Long.hours(): Period

N hours period

Link copied to clipboard
fun instantOf(millis: Long): Instant

create new Instant instance with milliseconds

Link copied to clipboard
fun lastDay(): DateTime
Link copied to clipboard
fun DateTime.lastDay(): DateTime
Link copied to clipboard
fun lastHour(): DateTime
Link copied to clipboard
fun DateTime.lastHour(): DateTime
Link copied to clipboard
fun lastMinute(): DateTime
Link copied to clipboard
fun DateTime.lastMinute(): DateTime
Link copied to clipboard
fun lastMonth(): DateTime
Link copied to clipboard
fun DateTime.lastMonth(): DateTime
Link copied to clipboard
fun lastSecond(): DateTime
Link copied to clipboard
fun DateTime.lastSecond(): DateTime
Link copied to clipboard
fun lastWeek(): DateTime
Link copied to clipboard
fun DateTime.lastWeek(): DateTime
Link copied to clipboard
fun lastYear(): DateTime
Link copied to clipboard
fun DateTime.lastYear(): DateTime
Link copied to clipboard
fun Period.later(): DateTime
Link copied to clipboard
infix fun <T : ReadableInstant> T.max(that: T): T
infix fun Duration.max(that: Duration): Duration

infix fun DateTime.max(that: DateTime): DateTime

get maximum DateTime

Link copied to clipboard
fun <T : ReadableInstant> maxOf(a: T, b: T, vararg args: T): T
fun maxOf(a: DateTime, b: DateTime, vararg args: DateTime): DateTime
fun maxOf(a: Duration, b: Duration, vararg args: Duration): Duration
Link copied to clipboard
fun milliDurationOf(millis: Long): Duration

duration with millis

Link copied to clipboard
fun Int.millis(): Period

Millsecond

fun Long.millis(): Period

N millis period

Link copied to clipboard
infix fun <T : ReadableInstant> T.min(that: T): T
infix fun Duration.min(that: Duration): Duration

infix fun DateTime.min(that: DateTime): DateTime

get minimum DateTime

Link copied to clipboard
fun <T : ReadableInstant> minOf(a: T, b: T, vararg args: T): T
fun minOf(a: DateTime, b: DateTime, vararg args: DateTime): DateTime
fun minOf(a: Duration, b: Duration, vararg args: Duration): Duration
Link copied to clipboard
operator fun DateTime.minus(millis: Long): DateTime

DateTime - operator

operator fun DateTime.minus(duration: ReadableDuration): DateTime
operator fun DateTime.minus(period: ReadablePeriod): DateTime
operator fun Instant.minus(millis: Long): Instant
operator fun Instant.minus(period: Period): Instant
operator fun Instant.minus(duration: ReadableDuration): Instant
operator fun Period.minus(period: ReadablePeriod?): Period

operator fun LocalDate.minus(period: Period): LocalDate
operator fun LocalDate.minus(duration: ReadableDuration): LocalDate

- operator for LocalDate

operator fun LocalDateTime.minus(duration: ReadableDuration): LocalDateTime
operator fun LocalDateTime.minus(period: ReadablePeriod): LocalDateTime

- operator for LocalDateTime

operator fun LocalTime.minus(period: Period): LocalTime
operator fun LocalTime.minus(duration: ReadableDuration): LocalTime

- operator for LocalTime

Link copied to clipboard
fun minuteDurationOf(minutes: Long): Duration

duration of minutes

Link copied to clipboard
fun DateTime.minuteInterval(minutes: Int = 1): Interval
Link copied to clipboard
fun Int.minutes(): Period

N Minutes

fun Long.minutes(): Period

N minutes period

Link copied to clipboard
fun DateTime.monthInterval(months: Int = 1): Interval

Get month interval in specified DateTime

Link copied to clipboard
fun Int.months(): Period

Period in N months

fun Long.months(): Period

N months period

Link copied to clipboard
fun AbstractInstant.mutableDateTimeUTC(): MutableDateTime

Convert Instant to MutableDateTimeWrapper with TimeZone UTC

Link copied to clipboard
fun nextDay(): DateTime
Link copied to clipboard
fun DateTime.nextDay(): DateTime
Link copied to clipboard
fun nextHour(): DateTime
Link copied to clipboard
fun DateTime.nextHour(): DateTime
Link copied to clipboard
fun nextMinute(): DateTime
Link copied to clipboard
fun DateTime.nextMinute(): DateTime
Link copied to clipboard
fun nextMonth(): DateTime
Link copied to clipboard
fun DateTime.nextMonth(): DateTime
Link copied to clipboard
fun nextSecond(): DateTime
Link copied to clipboard
fun DateTime.nextSecond(): DateTime
Link copied to clipboard
fun nextWeek(): DateTime
Link copied to clipboard
fun DateTime.nextWeek(): DateTime
Link copied to clipboard
fun nextYear(): DateTime
Link copied to clipboard
fun DateTime.nextYear(): DateTime
Link copied to clipboard
fun now(): DateTime

current DateTime

Link copied to clipboard
fun String.parseIsAfterNow(dateTimeFormat: DateTimeFormatter): Boolean
Link copied to clipboard
fun String.parseIsBeforeNow(dateTimeFormat: DateTimeFormatter): Boolean
Link copied to clipboard
fun periodOfDay(d: Int): Period
Link copied to clipboard
fun periodOfHours(h: Int): Period
Link copied to clipboard
fun periodOfMillis(m: Int): Period
Link copied to clipboard
fun periodOfMinutes(m: Int): Period
Link copied to clipboard
fun periodOfMonths(m: Int): Period
Link copied to clipboard
fun periodOfSeconds(s: Int): Period
Link copied to clipboard
fun periodOfWeek(w: Int): Period
Link copied to clipboard
fun periodOfYears(y: Int): Period
Link copied to clipboard
operator fun DateTime.plus(millis: Long): DateTime
operator fun DateTime.plus(duration: ReadableDuration): DateTime
operator fun DateTime.plus(period: ReadablePeriod): DateTime

DateTime + operator

operator fun Instant.plus(millis: Long): Instant
operator fun Instant.plus(period: Period): Instant
operator fun Instant.plus(duration: ReadableDuration): Instant
operator fun Period.plus(period: ReadablePeriod?): Period

operator fun LocalDate.plus(period: Period): LocalDate
operator fun LocalDate.plus(duration: ReadableDuration): LocalDate

+ operator for LocalDate

operator fun LocalDateTime.plus(duration: ReadableDuration): LocalDateTime
operator fun LocalDateTime.plus(period: ReadablePeriod): LocalDateTime

+ operator for LocalDateTime

operator fun LocalTime.plus(period: Period): LocalTime
operator fun LocalTime.plus(duration: ReadableDuration): LocalTime

+ operator for LocalTime

Link copied to clipboard
operator fun Period.rangeTo(end: ReadableInstant): Interval
operator fun ReadableInstant.rangeTo(duration: ReadableDuration): Interval
operator fun ReadableInstant.rangeTo(endExclusive: ReadableInstant): Interval
operator fun ReadableInstant.rangeTo(period: ReadablePeriod): Interval
Link copied to clipboard
fun secondDurationOf(seconds: Long): Duration

duration of seconds

Link copied to clipboard
fun Int.seconds(): Period

Seconds

fun Long.seconds(): Period

N seconds period

Link copied to clipboard
fun standardDays(days: Long): Duration

specified days duration

Link copied to clipboard
fun Period.standardDuration(): Duration
Link copied to clipboard
fun standardHours(hours: Long): Duration

specified hours duration

Link copied to clipboard
fun standardMinutes(minutes: Long): Duration

specified minutes duration

Link copied to clipboard
fun standardSeconds(seconds: Long): Duration

specified seconds duration

Link copied to clipboard
fun DateTime.startOfDay(): DateTime

Start time of Day from this dateTime

Link copied to clipboard
fun DateTime.startOfMonth(): DateTime

Start time of Month from this dateTime

Link copied to clipboard
fun DateTime.startOfWeek(): DateTime
Link copied to clipboard
fun DateTime.startOfYear(): DateTime

Start time of Year from this dateTime

Link copied to clipboard
fun thisHour(): Interval
Link copied to clipboard
fun thisMinute(): Interval
Link copied to clipboard
fun thisSecond(): Interval
Link copied to clipboard
operator fun Int.times(period: Period): Period
operator fun Long.times(period: Period): Period

N times period

operator fun Duration.times(multiplicand: Long): Duration
operator fun Period.times(scalar: Int): Period
Link copied to clipboard
fun Date.toDateTime(): DateTime

Convert Date to DateTime

fun String.toDateTime(pattern: String? = null): DateTime?

Parse string to DateTime

Link copied to clipboard
fun today(): DateTime

Today (only date part without time part)

Link copied to clipboard
fun String.toInterval(): Interval?

Parse string to Interval

Link copied to clipboard

Convert DateTime to ISO Date Format String (YYYY-MM-DD)

Link copied to clipboard

Convert DateTime to ISO DateTime Format String without millis (YYYY-MM-DD hh:nn:ss)

Link copied to clipboard
fun DateTime.toIsoFormatString(): String

Convert DateTime to ISO DateTime Format String (YYYY-MM-DD hh:nn:ss.zzz)

Link copied to clipboard

Convert DateTime to ISO Time Format String without millis (hh:nn:ss)

Link copied to clipboard

Convert DateTime to ISO Time Format String (hh:nn:ss.zzz)

Link copied to clipboard
fun Date.toLocalDate(): LocalDate

Convert Date to LocalDate

fun String.toLocalDate(pattern: String? = null): LocalDate?

Parse string to LocalDate

Link copied to clipboard
fun Date.toLocalDateTime(): LocalDateTime

Convert Date to LocalDateTime

Link copied to clipboard
fun Date.toLocalTime(): LocalTime

Convert Date to LocalTime

fun String.toLocalTime(pattern: String? = null): LocalTime?

Parse string to LocalTime

Link copied to clipboard
fun tomorrow(): DateTime

next day of current DateTime

Link copied to clipboard
fun DateTime.tomorrow(): DateTime

next day

Link copied to clipboard
fun DateTime.toTimestamp(): Timestamp

Convert DateTime to Timestamp

Link copied to clipboard
fun DateTime.trimToHour(hour: Int = this.hourOfDay): DateTime
Link copied to clipboard
fun DateTime.trimToMinute(minute: Int = this.minuteOfHour): DateTime
Link copied to clipboard
fun DateTime.trimToSecond(second: Int = this.secondOfMinute): DateTime
Link copied to clipboard
operator fun Duration.unaryMinus(): Duration
operator fun Period.unaryMinus(): Period
Link copied to clipboard
fun DateTime.weekInterval(weeks: Int = 1): Interval
Link copied to clipboard
fun Int.weeks(): Period

Period in N weeks

fun Long.weeks(): Period

N weeks period

Link copied to clipboard
fun Int.years(): Period

Period in N years

fun Long.years(): Period

N years period

Link copied to clipboard
fun yesterday(): DateTime

last day of current DateTime

Link copied to clipboard
fun DateTime.yesterday(): DateTime

last day