Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extern crate chrono;
- use chrono::NaiveDate;
- use chrono::Duration;
- fn from_days_since_1900(days_since_1900: i64) -> NaiveDate {
- let d1900 = NaiveDate::from_ymd(1900, 1, 1);
- d1900 + Duration::days(days_since_1900)
- }
- fn main() {
- println!("{}", from_days_since_1900(40000));
- }
Add Comment
Please, Sign In to add comment