2 releases
0.1.2-619366e | Jan 3, 2021 |
---|---|
0.1.1-211a512 | Jan 2, 2021 |
#576 in Date and time
44KB
433 lines
Fakedate
Fakedate generates pseudo-random dates and times.
It is written in Rust and is mostly a toy project to ramp up on the language. It might however be useful. Use at your own risk.
Status
Current version is 0.1.2.
Install
No install target yet, copy the fakedate
binary in your $PATH
if you wish, that's all.
A few commands which may prove useful:
cargo build # build debug binary in ./target/debug/
cargo build --release # build release binary in ./target/release/
cargo test # launch tests
rustfmt src/*.rs # format code
./docker-build.sh # build Docker image with version tag
./bump-version.sh # bump minor version number
Usage
Simply launch:
cargo run
Or just run the binary directly:
./target/debug/fakedate
./target/release/fakedate
Alternatively, using docker:
docker run ufoot/fakedate
To pass options:
cargo run -- -1975
By default, the date is a random date for the current year. To use a different year:
fakedate -1975
Other standard options include:
-n
,--no-newline
: no newline char at the end of the date-w
,--week-end
: force the date to be last week-end-h
,--help
: display a short help.-v
,--version
: display version.
Legal information
Fakedate is licensed under the MIT license.
Dependencies
~2.3–3MB
~55K SLoC