File: test.py

package info (click to toggle)
kopeninghours 25.04.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 920 kB
  • sloc: cpp: 3,918; yacc: 795; lex: 335; python: 18; sh: 17; makefile: 16
file content (12 lines) | stat: -rwxr-xr-x 424 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2020 David Faure <faure@kde.org>
# SPDX-License-Identifier: LGPL-2.0-or-later

from PyKOpeningHours import PyKOpeningHours

parser = PyKOpeningHours.OpeningHours()
parser.setExpression('Friday 11:00 am - 11:00 pm')
if parser.error() != PyKOpeningHours.Error.NoError:
    print("ERROR parsing expression:" + str(parser.error()))
else:
    print(parser.normalizedExpression())