mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
Found while testing crates/forms/src/af.rs:638-642 and 750-755 (parse_date) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
11 lines
432 B
Rust
11 lines
432 B
Rust
use pdfcraft_forms::af::parse_date;
|
|
|
|
#[test]
|
|
fn bare_a_suffix_is_am() {
|
|
assert_eq!(parse_date("12:05 a", "h:MM t").map(|d| d.hh), Some(0));
|
|
assert_eq!(parse_date("12:30a", "h:MM t").map(|d| d.hh), Some(0));
|
|
assert_eq!(parse_date("5:30 a", "h:MM t").map(|d| d.hh), Some(5));
|
|
assert_eq!(parse_date("5:30p", "h:MM t").map(|d| d.hh), Some(17));
|
|
assert_eq!(parse_date("12:05 p", "h:MM t").map(|d| d.hh), Some(12));
|
|
}
|