pub fn parse_date<T: AsRef<str>, U: AsRef<str>>(
date_str: T,
format: U,
) -> Option<i64>Expand description
Parses a date string into a Unix timestamp (seconds since epoch) using the specified format.
The result will be in UTC. The format string should be valid for Swift’s DateFormatter.
§Examples
ⓘ
use aidoku::imports::std::parse_date;
let timestamp = parse_date("07-01-2025 13:00", "MM-dd-yyyy HH:mm");
assert_eq!(timestamp, Some(1751374800));