Package org.noelware.iana

Types

Link copied to clipboard
data class IANATimezone(    val name: String,     val alternativeName: String,     val group: List<String>,     val continentCode: String,     val continentName: String,     val countryCode: String,     val countryName: String,     val mainCities: List<String>,     val rawOffsetInMinutes: Long,     val abbreviation: String)

Represents a timezone from the IANA Timezone Database.

Functions

Link copied to clipboard
fun IANATimezone.toZoneId(): ZoneId

Returns the ZoneId object of this IANA timezone.

Link copied to clipboard
fun Instant.withTimezone(tz: IANATimezone): ZonedDateTime

Returns a ZonedDateTime object with a given timezone.

Properties

Link copied to clipboard
val AFRICA: List<IANATimezone>

Returns all the timezones that are prefixed with Africa/

Link copied to clipboard
val AMERICAS: List<IANATimezone>

Returns all the timezones that are prefixed with America/

Link copied to clipboard
val ANTARCTICA: List<IANATimezone>

Returns all the timezones that are prefixed with Antarctica/

Link copied to clipboard
val ASIA: List<IANATimezone>

Returns all the timezones that are prefixed with Asia/

Link copied to clipboard
val ATLANTIC: List<IANATimezone>

Returns all the timezones that are prefixed with Atlantic/

Link copied to clipboard
val AUSTRALIA: List<IANATimezone>

Returns all the timezones that are prefixed with Australia/

Link copied to clipboard
val EUROPEAN: List<IANATimezone>

Returns all the timezones that are prefixed with Europe/

Link copied to clipboard
val INDIAN: List<IANATimezone>

Returns all the timezones that are prefixed with Indian/

Link copied to clipboard
val PACIFIC: List<IANATimezone>

Returns all the timezones that are prefixed with Pacific/

Link copied to clipboard
val TIMEZONES: List<IANATimezone>

Returns all the timezones available as a List.