From b69d67de6e14b83647b4e4201cc2403b30d4df8a Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 26 Aug 2024 23:42:50 -0700 Subject: version 0.0.3 --- .gitignore | 1 + CHANGELOG.md | 19 +++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 2 +- src/main.rs | 11 ----------- 6 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 CHANGELOG.md delete mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore index ea8c4bf..10c0313 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +main.rs \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..90673e4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [0.0.3] - 2024-08-26 + +### Added +- Unittests for `eorzean_time` and `eorzean_weather` modules. + +### Changed +- Integer timestamps will now be interpreted as seconds since epoch instead of milliseconds. + +### Fixed +- Incorrect offset used when converting time to EorzeanDate causing for index out of bounds sometimes when reading moon phase prefix + \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 56e843d..d346a66 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -66,7 +66,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "ffxiv-chronowatcher" -version = "0.0.2" +version = "0.0.3" dependencies = [ "chrono", "serde", diff --git a/Cargo.toml b/Cargo.toml index 75554fb..c16fafa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "Weather and Eorzean Time Library for Final Fantasy XIV" repository = "https://github.com/pinapelz/ffxiv-chronowatcher" readme = "README.md" keywords = ["ffxiv", "eorzea", "weather", "time"] -version = "0.0.2" +version = "0.0.3" edition = "2021" exclude = [ "src/main.rs", diff --git a/README.md b/README.md index e9d1a92..f96ee7b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Chronowatcher is a Rust library for getting the time and weather of locations in - Retrieving Eorzean Date ```rust use eorzean_weather::calculate_forecast; -current_time = Utc::now().timestamp_millis(); +current_time = Utc::now().timestamp(); let eorzean_date = eorzean_time::convert_to_eorzean_date(current_time); // EorzeanDate { guardian: "Thaliak", phase: "Waxing Half Moon", moon: "Second Astral Moon", years: 1069, suns: 9, bells: 5, minutes: 54 } diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 2d79ece..0000000 --- a/src/main.rs +++ /dev/null @@ -1,11 +0,0 @@ -mod eorzean_time; - -use chrono::Utc; -use eorzean_time::convert_seconds_to_eorzean_duration; - - -fn main() { - let current_time = Utc::now().timestamp_millis(); - let eorzean_date = eorzean_time::convert_to_eorzean_date(current_time); - println!("{:?}", eorzean_date); -} \ No newline at end of file -- cgit v1.2.3