epoch-timestamp

Crates.ioepoch-timestamp
lib.rsepoch-timestamp
version1.0.0
sourcesrc
created_at2020-07-14 09:03:33.713314
updated_at2020-07-14 09:03:33.713314
descriptionBoilerplate collection for epoch timestamping
homepagehttps://github.com/myyrakle/myyrakle_boom/blob/master/README.md
repositoryhttps://github.com/myyrakle/epoch-timestamp
max_upload_size
id264976
size2,905
myyrakle (myyrakle)

documentation

https://github.com/myyrakle/myyrakle_boom/blob/master/README.md

README

epoch-timestamp

GitHub license

Boilerplate collection for epoch(unix) timestamping.

You can get the current time as an epoch timestamp as shown below.

let now = Epoch::now(); //return u64 

And if you want to make tomorrow's time a timestamp, you can do this.

let tomorrow = now + Epoch::day(1);

Epoch::day function converts 64 numbers passed as arguments to day units.

Other conversion functions are as follows.

Epoch::second(2); //2 seconds
Epoch::minute(3); //3 minutes
Epoch::hour(4); //4 hours
Epoch::day(5); //5 days
Epoch::week(6); //6 weeks
Epoch::year(7); //7 years
Commit count: 5

cargo fmt