Function qif_parser::parse

source ·
pub fn parse<'a>(
    qif_content: &'a str,
    date_format: &str
) -> Result<Qif<'a>, QifParsingError>
Expand description

This is the parsing function. It takes the text content of your QIF file as an argument, and the date format.

Indeed, the date in a QIF file doesn’t have a pre-determined format, which means you could receive QIF files with completely different formats. Please use, for the date_format, the format you would use with Chrono (https://docs.rs/chrono/0.4.13/chrono/format/strftime/index.html#specifiers)

Some examples: (all for November 1st, 1982) 01/11/1982 -> %d/%m/%Y 01/11/82 -> %d/%m/%y 11/01/1982 -> %m/%d/%Y 11/01’1982 -> %m/%d’%Y

The parser will then return a Qif data structure or an error