It's working!

Still need to add more tests, but I think we're mostly good to go
pull/12/head
Bradlee Speice 2018-07-08 15:11:29 -04:00
parent e049618fff
commit c954a533c3
1 changed files with 4 additions and 0 deletions

View File

@ -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<usize>, tokens: Vec<String>) -> Vec<String> {
let mut skipped_tokens: Vec<String> = vec![];
println!("idxs: {:?}, tokens: {:?}", skipped_idxs, tokens);
let mut sorted_idxs = skipped_idxs.clone();
sorted_idxs.sort();