Skip to content

Commit

Permalink
Merge pull request #737 from niccokunzmann/issue-716-alarms
Browse files Browse the repository at this point in the history
Add calculation of alarm times
  • Loading branch information
niccokunzmann authored Nov 14, 2024
2 parents 569c40b + bdfd9d2 commit 6bc1d44
Show file tree
Hide file tree
Showing 32 changed files with 7,291 additions and 71 deletions.
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Minor changes:
- Added ``end``, ``start``, ``duration``, ``DTSTART``, ``DUE``, and ``DURATION`` attributes to ``Todo`` components. See `Issue 662`_.
- Format test code with Ruff. See `Issue 672 <https://github.com/collective/icalendar/issues/672>`_.
- Document the Debian package. See `Issue 701 <https://github.com/collective/icalendar/issues/701>`_.
- Document ``vDatetime.from_ical``
- Allow passing a ``datetime.date`` to ``TZP.localize_utc`` and ``TZP.localize`` methods.
- Document component classes with description from :rfc:`5545`.

Breaking changes:
Expand All @@ -19,6 +21,13 @@ New features:

- Add ``VALARM`` properties for :rfc:`9074`. See `Issue 657 <https://github.com/collective/icalendar/issues/657>`_
- Test compatibility with Python 3.13
- Add ``icalendar.alarms`` module to calculate alarm times. See `Issue 716 <https://github.com/collective/icalendar/issues/716>`_.
- Add ``Event.alarms`` and ``Todo.alarms`` to access alarm calculation.
- Add ``Component.DTSTAMP`` and ``Component.LAST_MODIFIED`` properties for datetime in UTC.
- Add ``Component.is_thunderbird()`` to check if the component uses custom properties by Thunderbird.
- Add ``X_MOZ_SNOOZE_TIME`` and ``X_MOZ_LASTACK`` properties to ``Event`` and ``Todo``.
- Add ``Alarm.ACKNOWLEDGED``, ``Alarm.TRIGGER``, ``Alarm.REPEAT``, and ``Alarm.DURATION`` properties
as well as ``Alarm.triggers`` to calculate alarm triggers.

Bug fixes:

Expand Down
7 changes: 7 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
API Reference
-------------

icalendar.alarms
++++++++++++++++

.. automodule:: icalendar.alarms
:members:


icalendar.cal
+++++++++++++

Expand Down
14 changes: 14 additions & 0 deletions src/icalendar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
from icalendar.alarms import (
Alarms,
AlarmTime,
ComponentEndMissing,
ComponentStartMissing,
IncompleteAlarmInformation,
LocalTimezoneMissing,
)
from icalendar.cal import (
Alarm,
Calendar,
Expand Down Expand Up @@ -94,4 +102,10 @@
"vMonth",
"IncompleteComponent",
"InvalidCalendar",
"Alarms",
"AlarmTime",
"ComponentEndMissing",
"ComponentStartMissing",
"IncompleteAlarmInformation",
"LocalTimezoneMissing",
]
Loading

0 comments on commit 6bc1d44

Please sign in to comment.