25 releases

0.6.18 Nov 27, 2023
0.6.15 Jun 14, 2023
0.6.4 Aug 12, 2022
0.5.6 Aug 6, 2022
0.4.1 Feb 22, 2021

#150 in Geospatial

Download history 89/week @ 2023-12-11 69/week @ 2023-12-18 15/week @ 2023-12-25 61/week @ 2024-01-08 154/week @ 2024-01-15 74/week @ 2024-01-22 110/week @ 2024-01-29 317/week @ 2024-02-05 120/week @ 2024-02-12 405/week @ 2024-02-19 123/week @ 2024-02-26 97/week @ 2024-03-04 110/week @ 2024-03-11 13/week @ 2024-03-18 10/week @ 2024-03-25

234 downloads per month
Used in opening-hours

MIT/Apache

48KB
1K SLoC

Rust 1K SLoC // 0.0% comments Pest 182 SLoC // 0.1% comments

Rust parser for OSM Opening Hours

Parsing component of opening-hours crate.

Usage

Add this to your Cargo.toml:

[dependencies]
opening-hours-syntax = "0"

And then a basic usage would look like that:

use opening_hours_syntax::parse;

// Opens until 18pm during the week and until 12am the week-end.
const OH: &str = "Mo-Fr 10:00-18:00; Sa-Su 10:00-12:00";

fn main() {
    let oh = parse(&OH).unwrap();
    eprintln!("{:?}", oh);
}
"Root Package"


"Package"


"Documentation"

lib.rs:

Parsing component of opening-hours crate.

Usage

Add this to your Cargo.toml:

[dependencies]
opening-hours-syntax = "0"

And then a basic usage would look like that:

use opening_hours_syntax::parse;

// Opens until 18pm during the week and until 12am the week-end.
const OH: &str = "Mo-Fr 10:00-18:00; Sa-Su 10:00-12:00";

fn main() {
    let oh = parse(&OH).unwrap();
    eprintln!("{:?}", oh);
}

Dependencies

~4MB
~78K SLoC