movement 0.2.0

Library to help with time calculations
Documentation
  • Coverage
  • 100%
    12 out of 12 items documented1 out of 9 items with examples
  • Size
  • Source code size: 12.23 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.66 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • manorajesh/movement
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • manorajesh

movement

Build Status Downloads Version License

Simple library and command to help out with time calculations (e.g. 1:23 PM + 3:30)

Installation

cargo add movement

Usage

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
}