emoji-clock-2
use emoji_clock_2::{Clock, TimeRounding};
use time::Time;
let clock = Clock::Dial(Time::MIDNIGHT, TimeRounding::Round);
assert_eq!("🕛", clock.to_string());
use emoji_clock_2::{Clock, TimeRounding};
use chrono::NaiveTime;
let am_clock = Clock::DialMeridiem(NaiveTime::from_hms_opt(9, 25, 00).unwrap(), TimeRounding::Round);
assert_eq!("🕤🌞", am_clock.to_string());
let pm_clock = Clock::DialMeridiem(NaiveTime::from_hms_opt(21, 25, 00).unwrap(), TimeRounding::Round);
assert_eq!("🕤🌝", pm_clock.to_string());
This library is inspired by emoji-clock.
- time and chrono compatibility: supports both chrono and time libraries through features. By default, none are enabled, giving you the freedom to choose.
no_std
- 30-Minute precision: more detailed time representation with double the granularity.
- Rounding options: round, floor or ceil.