Crates.io | dnt |
lib.rs | dnt |
version | 0.1.1 |
source | src |
created_at | 2020-10-22 18:37:23.047619 |
updated_at | 2020-10-22 19:05:19.08726 |
description | Simple date and time formatting using chrono crate |
homepage | https://crates.io/crates/dnt |
repository | https://github.com/giripriyadarshan/dnt |
max_upload_size | |
id | 304430 |
size | 5,018 |
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