All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.blue.starry.gerolt.weather.Forecast.kt Maven / Gradle / Ivy

The newest version!
package blue.starry.gerolt.weather

import blue.starry.gerolt.zone.EorzeaZone
import blue.starry.gerolt.time.EorzeaTime
import blue.starry.gerolt.time.toEarthTime
import java.time.Instant

fun EorzeaZone.forecastWeather(time: Instant): EorzeaWeather {
    return forecastWeatherByChance(calculateChance(time.epochSecond))
}

fun EorzeaZone.forecastWeather(time: EorzeaTime): EorzeaWeather {
    return forecastWeather(time.toEarthTime())
}

fun EorzeaTime.forecastWeather(zone: EorzeaZone): EorzeaWeather {
    return zone.forecastWeather(this)
}

val EorzeaZone.weather: EorzeaWeather
    get() = forecastWeather(Instant.now())




© 2015 - 2025 Weber Informatics LLC | Privacy Policy