From c954a533c3ba94a6213f2c20fa395a2b169a8ea4 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sun, 8 Jul 2018 15:11:29 -0400 Subject: [PATCH] It's working! Still need to add more tests, but I think we're mostly good to go --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 02c6a1a..334bae2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -953,9 +953,12 @@ impl Parser { let hour = value.to_i64().unwrap() as i32; let ampm = info.get_ampm(&tokens[idx + 2]).unwrap(); res.hour = Some(self.adjust_ampm(hour, ampm)); + idx += 1; } else { ymd.append(value.floor().to_i64().unwrap() as i32, &value_repr, None)?; } + + idx += 1; } else if info.get_ampm(&tokens[idx + 1]).is_some() && (*ZERO <= value && value < *TWENTY_FOUR) { @@ -1098,6 +1101,7 @@ impl Parser { fn recombine_skipped(&self, skipped_idxs: Vec, tokens: Vec) -> Vec { let mut skipped_tokens: Vec = vec![]; + println!("idxs: {:?}, tokens: {:?}", skipped_idxs, tokens); let mut sorted_idxs = skipped_idxs.clone(); sorted_idxs.sort();