| Crates.io | movement |
| lib.rs | movement |
| version | 0.2.0 |
| created_at | 2023-06-10 06:15:47.83018+00 |
| updated_at | 2023-06-12 20:11:50.977671+00 |
| description | Library to help with time calculations |
| homepage | |
| repository | https://github.com/manorajesh/momento |
| max_upload_size | |
| id | 886757 |
| size | 12,574 |
Simple library and command to help out with time calculations (e.g. 1:23 PM + 3:30)
cargo add movement
fn adding_with_str() {
let mut watch = Watch::new("2:15:01 A.M", true);
watch += "3:14";
println!("{}", watch);
// outputs 05:29:01 AM
}
fn subtracting_with_secs() {
let mut watch = Watch::new("13:34", true);
watch += 4343;
println!("{}", watch);
// outputs 02:46:23 PM
}