Skip to main content

Python module providing access to the opening_hours.js library which is written in JavaScript.

Project description

Build Status

Python module providing access to the opening_hours.js library which is written in JavaScript.

This python library only implements the simple API from opening_hours.js at the moment (without optional parameters).


Install `pyopening_hours <>`__ simply by using pip:

pip install pyopening_hours


import pyopening_hours

    oh = pyopening_hours.OpeningHours(u'Lun-')
except pyopening_hours.ParseException as error:

value = u'Mon,Tu,Th,Fr 12:00-18:00; Samstag 12:00-17:00 "I ❤ unicode"; Th[3] OFF; Th[-1] off'
oh = pyopening_hours.OpeningHours(value)
print('Parsing complex value: %s' % value)
print('Is%s week stable' % ('' if oh.isWeekStable() else ' not'))
print('Facility is %s' % oh.getStateString())
print('Next change in UTC: %s' % oh.getNextChange().strftime('%Y-%m-%d %H:%M:%S'))
for line in oh.getWarnings():
    print('  ' + line)


Just clone the repository with

git clone

and install it’s dependencies (execute inside the repository):

make installDependencies

Used by other projects

This library is used in the following projects:

Other modules

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyopening_hours, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size pyopening_hours-0.1.2.linux-x86_64.tar.gz (111.8 kB) File type Dumb Binary Python version any Upload date Hashes View hashes
Filename, size pyopening_hours-0.1.2.tar.gz (954.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page