Skip to content

wo-ist-markt/opening_hours_html_formatter.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opening_hours_html_formatter.js

This library can be used to HTML format opening hours. The opening hours must conform to the OpenStreetMap opening hours format specification.

Usage

Please take a look at the demo to understand how to integrate the library.

A typical processing chain looks something like this:

"Mo-Tu, Th-Su 08:00-20:00"

           ||
           \/
      ______________
     /              \
     | OpeningTimes |
     \______________/

           ||
           \/
     _______________
    /               \
    | WeekGenerator |
    \_______________/

           ||
           \/
 ________________________
/                        \
| WeekTableHtmlGenerator |
\________________________/

           ||
           \/

       HTML table

Please note, that all elements of the library can be found under the following namespace:

window.ohhf.*

Deployment

A shell script is used to concatenate all JavaScript files into one. Run the following command to generate the library:

$ deploy/deploy.sh

Afterwards, the generated one-file-library can be found in the dist folder.

Dependencies

The following libraries are used by this library and must be provided in the application project.

License

This library is freely distributable under the terms of the MIT license.