Crates.io | gedcomx_date |
lib.rs | gedcomx_date |
version | 0.1.0 |
source | src |
created_at | 2016-03-08 21:26:39.3865 |
updated_at | 2023-07-10 08:05:56.791421 |
description | Gedcomx Date Parser |
homepage | |
repository | |
max_upload_size | |
id | 4402 |
size | 47,754 |
Gedcomx date parsing written with nom in rust. See documentation here.
let date = gedcomx_date::parse("2015-06-26T16:43:23+02:00").unwrap();
Will give you:
GedcomxDate::Simple {
date: Date {
year: 2015,
month: Some(6),
day: Some(26),
},
time: Some(Time {
hours: 16,
minutes: Some(43),
seconds: Some(23),
tz_offset_hours: Some(2),
tz_offset_minutes: Some(0),
}),
};
Update your Cargo.toml
:
[dependencies]
gedcomx_date = "0.0.1"
fn main() {
let date = gedcomx_date::parse("+1988-03-29T03:19+01");
print!("{:?}", date);
}
MIT License Copyright (c) 2016 Nicolas Barbotte