From 72efcceb945fb80a576775a513b64e104078e9f0 Mon Sep 17 00:00:00 2001 From: dfhoughton Date: Sun, 10 Feb 2019 16:35:23 -0500 Subject: added specific_time rule --- CHANGES.md | 4 +++- Cargo.lock | 4 +++- Cargo.toml | 2 +- README.md | 1 + src/lib.rs | 54 +++++++++++++++++++++++++++++++++++++++++++----------- tests/tests.rs | 16 ++++++++++++++++ 6 files changed, 67 insertions(+), 14 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9829457..8ac3e0a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,4 +22,6 @@ * better organization and documentation of grammar ## 1.06 * added "before and after" -* fixed "Friday the 13th" and "the 31st" to scan back through the calendar to the nearest match \ No newline at end of file +* fixed "Friday the 13th" and "the 31st" to scan back through the calendar to the nearest match +## 1.0.7 +* added `` pattern: e.g., 1969-05-06 12:03:05 \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 5c69fb6..62c7e5e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "aho-corasick" version = "0.6.9" @@ -108,7 +110,7 @@ dependencies = [ [[package]] name = "two_timer" -version = "1.0.6" +version = "1.0.7" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 26f7151..7ea2a3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "two_timer" -version = "1.0.6" +version = "1.0.7" authors = ["dfhoughton "] description="parser for English time expressions" homepage="https://github.com/dfhoughton/two-timer" diff --git a/README.md b/README.md index e37cd53..96ce49d 100644 --- a/README.md +++ b/README.md @@ -36,5 +36,6 @@ Some expressions it can handle: * 2 weeks ago * ten seconds from now * 5 minutes before and after midnight +* 1969-05-06 12:03:05 The complete API is available at https://docs.rs/two_timer/0.1.0/two_timer/. diff --git a/src/lib.rs b/src/lib.rs index b1f6e07..15a11e8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -269,7 +269,9 @@ lazy_static! { at_time -> ("at")