Skip to content

Publidata/opening_hours_converter

Repository files navigation

Opening Hours Converter

OpenStreetMap Opening Hours to Date & Date to Opening Hours

See Wiki for OpenStreetMap Opening Hours specification.

Installation

gem install opening_hours_converter

Usage

require 'opening_hours_converter'

parsed_oh = OpeningHoursConverter::OpeningHoursParser.new.parse('Mo 10:00-12:00')
oh_string = OpeningHoursConverter::OpeningHoursBuilder.new.build(parsed_oh)

Test

Install the dependencies with:

bundle install

Then run all the tests with:

rspec spec --format=documentation

Credits

Done with YoHours as inspiration and with constant help from the Evaluation tool/repository.