date-calc-rs

Crates.iodate-calc-rs
lib.rsdate-calc-rs
version0.2.1
sourcesrc
created_at2024-11-01 00:34:14.31712
updated_at2024-11-01 00:48:58.213107
descriptionGiven a number of days, calculates the date from today
homepage
repository
max_upload_size
id1431112
size16,130
(oli-ver-d)

documentation

README

Date Calculation Tool

A simple command-line application written in Rust that calculates a future date based on the number of days added to the current date.

Features

  • Calculate the date a specified number of days from today.
  • Option to display only the date without any additional text.

Installation

To build and run this application, you need to have Rust and Cargo installed on your machine. If you haven't installed Rust yet, you can do so by following the instructions at rust-lang.org.

Once Rust is installed, you can clone this repository and build the project:

git clone <repository-url>
cd <repository-name>
cargo build --release

Usage

You can run the application using the following command:

./target/release/date-calc-rs <DAYS>

Options

  • -d or --date-only: (Optional) Display only the date

Example

To calculate the date 10 days from now:

./target/release/date-calc-rs 10

Output:

In 10 days the date will be 11-11-2024

Or with the date-only flag:

./target/release/date-calc-rs --date-only 10

Output:

11-11-2024

Dependencies

This project uses the following dependencies:

  • chrono - For date and time manipulation
  • clap - For parsing command-line arguments

License

This project is licensed under the MIT license

Commit count: 0

cargo fmt