Skip to content

vaibhavagnihotri/datediff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Datediff

A Rust Library for getting difference of two dates as Interval i.e days, months and years.

Usage

Add this to your Cargo.toml:

[dependencies]
datediff = "0.1"

Quick Start

use chrono::NaiveDate;

use datediff::get_diff;

let start_date = NaiveDate::from_ymd(1947, 8, 15);
let end_date = NaiveDate::from_ymd(1950, 1, 26);

println!("Duration is {}", get_diff(&start_date, &end_date));

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages