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 74/week @ 2024-03-13 10/week @ 2024-03-20 7/week @ 2024-03-27 19/week @ 2024-04-03 10/week @ 2024-04-10 10/week @ 2024-04-24 469/week @ 2024-05-01 219/week @ 2024-05-08 151/week @ 2024-05-15 86/week @ 2024-05-22 53/week @ 2024-05-29 75/week @ 2024-06-05 70/week @ 2024-06-12 31/week @ 2024-06-19 24/week @ 2024-06-26

215 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
~76K SLoC