LocalDateTimeType

final class LocalDateTimeType(dateTime: LocalDateTime) extends AnyVal

Provides extension methods to java.time.LocalDateTime

class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def +(amount: TemporalAmount): LocalDateTime

Gets date-time with specified amount added.

Gets date-time with specified amount added.

Value Params
amount

temporal amount

def -(amount: TemporalAmount): LocalDateTime

Gets date-time with specified amount subtracted.

Gets date-time with specified amount subtracted.

Value Params
amount

temporal amount

def atEndOfDay(using precision: TimePrecision): LocalDateTime

Gets date-time adjusted to end of day.

Gets date-time adjusted to end of day.

Value Params
precision

time precision

def atEndOfHour(using precision: TimePrecision): LocalDateTime

Gets date-time adjusted to end of hour.

Gets date-time adjusted to end of hour.

Value Params
precision

time precision

def atEndOfMicros(using precision: TimePrecision): LocalDateTime

Gets date-time adjusted to end of microsecond.

Gets date-time adjusted to end of microsecond.

Value Params
precision

time precision

def atEndOfMillis(using precision: TimePrecision): LocalDateTime

Gets date-time adjusted to end of millisecond.

Gets date-time adjusted to end of millisecond.

Value Params
precision

time precision

def atEndOfMinute(using precision: TimePrecision): LocalDateTime

Gets date-time adjusted to end of minute.

Gets date-time adjusted to end of minute.

Value Params
precision

time precision

def atEndOfMonth(using precision: TimePrecision): LocalDateTime

Gets date-time adjusted to last day of month.

Gets date-time adjusted to last day of month.

Value Params
precision

time precision

def atEndOfSecond(using precision: TimePrecision): LocalDateTime

Gets date-time adjusted to end of second.

Gets date-time adjusted to end of second.

Value Params
precision

time precision

def atEndOfWeek(using precision: TimePrecision): LocalDateTime

Gets date-time adjusted to last day of week.

Gets date-time adjusted to last day of week.

Note

Saturday is last day of week.

def atEndOfWeek(lastDay: DayOfWeek)(using precision: TimePrecision): LocalDateTime

Gets date-time adjusted to specified last day of week.

Gets date-time adjusted to specified last day of week.

Value Params
lastDay

last day of week

precision

time precision

def atEndOfYear(using precision: TimePrecision): LocalDateTime

Gets date-time adjusted to last day of year.

Gets date-time adjusted to last day of year.

Value Params
precision

time precision

def atStartOfDay: LocalDateTime

Gets date-time truncated to day.

Gets date-time truncated to day.

def atStartOfHour: LocalDateTime

Gets date-time truncated to hour.

Gets date-time truncated to hour.

def atStartOfMicros: LocalDateTime

Gets date-time truncated to microsecond.

Gets date-time truncated to microsecond.

def atStartOfMillis: LocalDateTime

Gets date-time truncated to millisecond.

Gets date-time truncated to millisecond.

def atStartOfMinute: LocalDateTime

Gets date-time truncated to minute.

Gets date-time truncated to minute.

def atStartOfMonth: LocalDateTime

Gets date-time adjusted to first day of month.

Gets date-time adjusted to first day of month.

def atStartOfSecond: LocalDateTime

Gets date-time truncated to second.

Gets date-time truncated to second.

def atStartOfWeek: LocalDateTime

Gets date-time adjusted to first day of week.

Gets date-time adjusted to first day of week.

Note

Sunday is first day of week.

def atStartOfWeek(firstDay: DayOfWeek): LocalDateTime

Gets date-time adjusted to specified first day of week.

Gets date-time adjusted to specified first day of week.

Value Params
firstDay

first day of week

def atStartOfYear: LocalDateTime

Gets date-time adjusted to first day of year.

Gets date-time adjusted to first day of year.

def iterateTo(end: LocalDateTime, step: TemporalAmount): Iterator[LocalDateTime]

Creates iterator to end date-time (inclusive).

Creates iterator to end date-time (inclusive).

Value Params
end

end date-time

step

temporal amount by which to step

Throws
IllegalArgumentException

if step is zero.

def iterateUntil(end: LocalDateTime, step: TemporalAmount): Iterator[LocalDateTime]

Creates iterator to end date-time (exclusive).

Creates iterator to end date-time (exclusive).

Value Params
end

end date-time

step

temporal amount by which to step

def max(other: LocalDateTime): LocalDateTime

Compares to other date-time and returns the greater value.

Compares to other date-time and returns the greater value.

Value Params
other

other date-time

def min(other: LocalDateTime): LocalDateTime

Compares to other date-time and returns the lesser value.

Compares to other date-time and returns the lesser value.

Value Params
other

other date-time

def toYearMonth: YearMonth

Gets YearMonth part of date-time.

Gets YearMonth part of date-time.