2 releases
0.1.1 | Oct 22, 2020 |
---|---|
0.1.0 | Oct 22, 2020 |
#505 in Date and time
4KB
52 lines
dnt
simple date and time formatting using chrono crate
usage
println!("{}", DnT::date(Local)); //Local is for device's local time
println!("{}", DnT::time(Local));
println!("{}", DnT::dateandtime(Local));
println!("{}", DnT::date(ZoneEast(5.5))); // for timezone towards east
println!("{}", DnT::time(ZoneEast(5.5)));
println!("{}", DnT::dateandtime(ZoneWest(5.5))); // for timezone towards west
Dependencies
~1MB
~18K SLoC