We already have several attributes like DTSTAMP that return a UTC timestamp. Todo misses the COMPLETED property that should be constructed in the same way. ```pycon >>> c = Calendar.from_ical("""BEGIN:VCALENDAR ... VERSION:2.0 ... PRODID:-//Example Corp.//CalDAV Client//EN ... BEGIN:VTODO ... UID:20070313T123432Z-456553@example.com ... DTSTAMP:20070313T123432Z ... COMPLETED;VALUE=DATE:20070501 ... SUMMARY:Submit Quebec Income Tax Return for 2006 ... CLASS:CONFIDENTIAL ... CATEGORIES:FAMILY,FINANCE ... STATUS:NEEDS-ACTION ... END:VTODO ... END:VCALENDAR""") >>> c.todos[0].COMPLETED Traceback (most recent call last): File "<python-input-10>", line 1, in <module> c.todos[0].COMPLETED AttributeError: 'Todo' object has no attribute 'COMPLETED' ``` Checklist for closing this issue: - [X] Add COMPLETED to VTODO https://github.com/PyCalendar/icalendar/pull/2023 - [ ] Check with the RFC if it is also present in other components - [ ] Make sure the example converts the date into a UTC datetime in the test - [ ] Both examples must work - [ ] create a test file and use that from the fixture in the test Examples: ``` BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example Corp.//CalDAV Client//EN BEGIN:VTODO UID:20070313T123432Z-456553@example.com DTSTAMP:20070313T123432Z COMPLETED:20070501 SUMMARY:Submit Quebec Income Tax Return for 2006 CLASS:CONFIDENTIAL CATEGORIES:FAMILY,FINANCE STATUS:NEEDS-ACTION END:VTODO END:VCALENDAR ``` ``` BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example Corp.//CalDAV Client//EN BEGIN:VTODO UID:20070313T123432Z-456553@example.com DTSTAMP:20070313T123432Z COMPLETED;VALUE=DATE:20070501 SUMMARY:Submit Quebec Income Tax Return for 2006 CLASS:CONFIDENTIAL CATEGORIES:FAMILY,FINANCE STATUS:NEEDS-ACTION END:VTODO END:VCALENDAR ``` Related: - https://github.com/pycalendar/icalendar_compatibility/issues/3#issuecomment-3992707487
Activity
docs(news): add news fragment for issue PyCalendar#1797
feat(cal/todo): align COMPLETED property with approved PyCalendar#1803 …