| Crates.io | julianday |
| lib.rs | julianday |
| version | 1.2.0 |
| created_at | 2020-05-02 10:56:17.036567+00 |
| updated_at | 2022-08-26 10:09:51.305628+00 |
| description | Julian day is the continuous count of days since the beginning of the Julian Period. This crate implements a method to convert a JulianDay or ModifiedJulianDay to and from the chrono's NaiveDate. |
| homepage | |
| repository | https://gitlab.com/cocainefarm/julianday |
| max_upload_size | |
| id | 236524 |
| size | 8,654 |
Julian day is the continuous count of days since the beginning of the Julian Period. This crate implements a method to convert a JulianDay to and from the chrono's NaiveDate.
JD)use chrono::NaiveDate;
use julianday::JulianDay;
fn main() {
let naivedate = NaiveDate::from_ymd(2020, 2, 18);
let julianday = JulianDay::from(naivedate);
let date = julianday.to_date();
}
MJD)use chrono::NaiveDate;
use julianday::ModifiedJulianDay;
fn main() {
let naivedate = NaiveDate::from_ymd(2020, 2, 18);
let mjd = ModifiedJulianDay::from(naivedate);
let date = mjd.to_date();
}