2016-05-28 15:53:56 +00:00
|
|
|
pub trait Parse : Sized {
|
|
|
|
|
|
|
|
fn parse(s: &str) -> Option<Self>;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-05-28 18:30:23 +00:00
|
|
|
pub fn time_parse_regex() -> &'static str {
|
|
|
|
r#"(?P<Y>\d{4})-(?P<M>\d{2})-(?P<D>\d{2})(T(?P<h>\d{2})(:(?P<m>\d{2})(:(?P<s>\d{2}))?)?)?$"#
|
|
|
|
}
|
|
|
|
|