Skip to content

Commit

Permalink
Merge pull request #744 from SerifOZ/issue-742
Browse files Browse the repository at this point in the history
  • Loading branch information
niccokunzmann authored Nov 16, 2024
2 parents 6bc1d44 + 024bd3a commit fb31c13
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ New features:
- 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.
- Add ``__doc__`` string documentation for ``vDate``. See `Issue 742 <https://github.com/collective/icalendar/issues/742>`_.

Bug fixes:

Expand Down
38 changes: 37 additions & 1 deletion src/icalendar/prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,43 @@ def __repr__(self):


class vDate(TimeBase):
"""Render and generates iCalendar date format.
"""Date
Value Name: DATE
Purpose: This value type is used to identify values that contain a
calendar date.
Format Definition: This value type is defined by the following
notation:
date = date-value
date-value = date-fullyear date-month date-mday
date-fullyear = 4DIGIT
date-month = 2DIGIT ;01-12
date-mday = 2DIGIT ;01-28, 01-29, 01-30, 01-31
;based on month/year
Description: If the property permits, multiple "date" values are
specified as a COMMA-separated list of values. The format for the
value type is based on the [ISO.8601.2004] complete
representation, basic format for a calendar date. The textual
format specifies a four-digit year, two-digit month, and two-digit
day of the month. There are no separator characters between the
year, month, and day component text.
Example: The following represents July 14, 1997:
19970714
>>> from icalendar.prop import vDate
>>> date = vDate.from_ical('19970714')
>>> date.year
1997
>>> date.month
7
>>> date.day
14
"""

def __init__(self, dt):
Expand Down

0 comments on commit fb31c13

Please sign in to comment.