diff options
| -rw-r--r-- | src/eorzean_time.rs | 4 | ||||
| -rw-r--r-- | src/eorzean_weather.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/eorzean_time.rs b/src/eorzean_time.rs index 53a728b..02b4cd9 100644 --- a/src/eorzean_time.rs +++ b/src/eorzean_time.rs @@ -149,7 +149,7 @@ pub fn convert_to_eorzean_time<T: ToUnixTimestamp>(input_time: T) -> (u8, u8) { /// /// # Returns /// - An `EorzeanTime` struct representing the Eorzean time equivalent of the input seconds -pub fn convert_earth_seconds_to_eorzean_duration(seconds: f64) -> EorzeanTime { +pub fn earth_sec_to_eorzea_duration(seconds: f64) -> EorzeanTime { let eorzean_seconds = seconds * 1.0/0.0486; let years = (eorzean_seconds / EORZEA_SECONDS_PER_YEAR) as u64; @@ -188,7 +188,7 @@ pub fn convert_earth_seconds_to_eorzean_duration(seconds: f64) -> EorzeanTime { /// /// # Returns /// - A `i64` representing the number of Earth seconds corresponding to the Eorzean duration -pub fn convert_eorzean_duration_to_earth_seconds(eorzean_duration: EorzeanTime) -> f64 { +pub fn eorzea_duration_to_earth_sec(eorzean_duration: EorzeanTime) -> f64 { let total_seconds = eorzean_duration.years as f64 * EORZEA_SECONDS_PER_YEAR + eorzean_duration.moons as f64 * EORZEA_SECONDS_PER_MOON + eorzean_duration.weeks as f64 * EORZEA_SECONDS_PER_WEEK + diff --git a/src/eorzean_weather.rs b/src/eorzean_weather.rs index 512b729..bb94c5d 100644 --- a/src/eorzean_weather.rs +++ b/src/eorzean_weather.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; use serde_json::from_str; use std::fs; use crate::eorzean_time::convert_to_eorzean_time; -use crate::eorzean_time::convert_eorzean_duration_to_earth_seconds; +use crate::eorzean_time::eorzea_duration_to_earth_sec; use crate::eorzean_time::EorzeanTime; use crate::eorzean_time::ToUnixTimestamp; @@ -116,7 +116,7 @@ pub fn calculate_current_weather_interval<T: ToUnixTimestamp>(current_time: T) - }; - let seconds_since_start_interval = convert_eorzean_duration_to_earth_seconds( + let seconds_since_start_interval = eorzea_duration_to_earth_sec( EorzeanTime { years: 0, moons: 0, @@ -128,7 +128,7 @@ pub fn calculate_current_weather_interval<T: ToUnixTimestamp>(current_time: T) - } ); - let seconds_to_end_interval = convert_eorzean_duration_to_earth_seconds( + let seconds_to_end_interval = eorzea_duration_to_earth_sec( EorzeanTime { years: 0, moons: 0, |
