Function extract_year

Source
pub fn extract_year(date: &str) -> Option<String>
Expand description

Extract a 4-digit year from various date formats.

Handles: “2024”, “2024-01-15”, “2024-00-00 2024”, “January 2024”, etc. Shared by bibtex.rs and bibliography.rs.