Crates.io | opening-hours-syntax |
lib.rs | opening-hours-syntax |
version | |
source | src |
created_at | 2021-02-22 15:55:21.031254+00 |
updated_at | 2025-02-07 16:06:47.926265+00 |
description | A parser for opening_hours fields in OpenStreetMap. |
homepage | https://github.com/remi-dupre/opening-hours-rs/tree/master/opening-hours-syntax |
repository | https://github.com/remi-dupre/opening-hours-rs |
max_upload_size | |
id | 359050 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Parsing component of opening-hours crate.
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);
}
The log feature can be enabled to emit warnings the [crate-log] crate.