toCalendar

fun Long.toCalendar(): Calendar

Convert Long to Calendar.

Since

1.1.0


fun Duration.toCalendar(): Calendar

Convert Duration to Calendar.

Since

1.1.0


@JvmOverloads
fun String.toCalendar(pattern: String = "EEE MMM dd HH:mm:ss zzz yyyy"): Calendar

Produce a Calendar from the given strings value and pattern.

Since

1.1.0

Return

A Calendar parsed from the string.

See also

Throws

if the beginning of the specified string cannot be parsed.

IllegalArgumentException

if the given pattern is invalid


Convert Date to Calendar.

Since

1.1.0


fun Instant.toCalendar(): Calendar

Convert Instant to Calendar.

Since

1.1.0


fun LocalDate.toCalendar(): Calendar

Convert LocalDate to Calendar.

Since

1.1.0


fun LocalDateTime.toCalendar(): Calendar

Convert LocalDateTime to Calendar.

Since

1.1.0


fun LocalTime.toCalendar(): Calendar

Convert LocalTime to Calendar.

Since

1.1.0