2018-07-03 06:22:58 +00:00
|
|
|
# Calendar.social
|
|
|
|
# Copyright (C) 2018 Gergely Polonkai
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
"""Calendar system base definition for Calendar.social
|
|
|
|
"""
|
|
|
|
|
2018-06-25 07:01:13 +00:00
|
|
|
class CalendarSystem:
|
2018-07-03 06:22:58 +00:00
|
|
|
"""Base class for calendar systems
|
|
|
|
"""
|
|
|
|
|
2018-06-25 07:01:13 +00:00
|
|
|
__has_months__ = False
|
|
|
|
__has_weeks__ = False
|
|
|
|
|
|
|
|
@property
|
|
|
|
def day_names(self):
|
2018-07-03 06:22:58 +00:00
|
|
|
"""An iterable of day names
|
|
|
|
"""
|
|
|
|
|
2018-06-25 07:01:13 +00:00
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
@property
|
|
|
|
def month(self):
|
2018-07-03 06:22:58 +00:00
|
|
|
"""The name of the current month, if applicable
|
|
|
|
|
|
|
|
It may include the year.
|
|
|
|
"""
|
|
|
|
|
2018-06-25 07:01:13 +00:00
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
|
|
@property
|
|
|
|
def days(self):
|
2018-07-03 06:22:58 +00:00
|
|
|
"""An iterable of days to be displayed on the month view, if applicable
|
|
|
|
"""
|
|
|
|
|
2018-06-25 07:01:13 +00:00
|
|
|
raise NotImplementedError()
|