toDayNumber

fun Instant.toDayNumber(dayCutoffHour: Int = 4, timeZone: TimeZone = TimeZone.currentSystemDefault()): Long

Converts an Instant to a day number, considering a specified day cutoff hour.

Return

The day number corresponding to the Instant.

Parameters

dayCutoffHour

The hour at which the day is considered to start (default is 4 AM).

timeZone

The time zone to use for the conversion (default is the system's current time zone).