Summary
date-time is written in places where another form is the right one. The correct form depends on the context, per the rules stevepiercy set out in the review of #1645, #1645 (comment)
- Where it names the value type of :rfc:
5545, as in VALUE=DATE-TIME or in a list with DATE, DURATION, and PERIOD, write DATE-TIME.
- Where it names a jCal type identifier per :rfc:
7265#section-3.6.5, or quotes the syntax of an RFC, write date-time.
- Where it means a moment in time, so that "a timestamp" would do instead, write
datetime.
The docstring of RECURRENCE_ID in attr.py has two of them, four lines apart. The first is prose and should read datetime, the second names the value type and is already correct.
The value is the original start date or date-time of that instance
The value is usually a DATE-TIME and must use the same value type
Scope
There are 62 occurrences of date-time across src and docs, 31 of them outside the tests, in 13 files, and 78 of DATE-TIME, which I would leave alone unless one turns out to be prose. I expect the work to be mostly date-time becoming datetime, with a good number correct already, so it is not a find and replace.
I did not find a date-time that needs to become DATE-TIME. The nearest is cal/alarm.py:173, "the current date-time value in UTC", which is quoted :rfc:9074 text and belongs with the copy-paste below.
They fall into four groups.
Correct as they are, jCal type identifiers. prop/dt/types.py:152 and :165, prop/dt/datetime.py:171 and :180, prop/broken.py:90, the jCal examples in cal/component.py:920 and docs/how-to/jcal.rst, and most of the 38 occurrences under tests/rfc_7265_jcal.
RFC copy-paste, which #1244 covers. prop/dt/datetime.py:32 copies the grammar rule date-time = date "T" time, written in the Augmented Backus-Naur Form (ABNF) notation the RFCs use, and :46 describes it. cal/alarm.py:173 quotes :rfc:9074. These go when those docstrings are rewritten, rather than being respelled.
Prose that should be datetime. attr.py:1179 is the clearest one.
Internal factory keys. prop/factory.py uses "date-time-list" as a lookup key in five places. Renaming it is a code change rather than a spelling fix, and it may be relied on through types_factory, so I would leave it alone unless you want it renamed.
Notes
#1645 added [Dd]ate-times? to docs/styles/config/vocabularies/icalendar/reject.txt, so Vale already rejects date-time in narrative documentation. Vale reads only docs/**.rst, so it does not see docstrings, and the jCal examples in docs/how-to/jcal.rst sit inside code blocks that it skips.
I did not find an existing issue for this, open or closed.
Related
Summary
date-timeis written in places where another form is the right one. The correct form depends on the context, per the rules stevepiercy set out in the review of #1645, #1645 (comment)5545, as inVALUE=DATE-TIMEor in a list withDATE,DURATION, andPERIOD, writeDATE-TIME.7265#section-3.6.5, or quotes the syntax of an RFC, writedate-time.datetime.The docstring of
RECURRENCE_IDinattr.pyhas two of them, four lines apart. The first is prose and should readdatetime, the second names the value type and is already correct.Scope
There are 62 occurrences of
date-timeacrosssrcanddocs, 31 of them outside the tests, in 13 files, and 78 ofDATE-TIME, which I would leave alone unless one turns out to be prose. I expect the work to be mostlydate-timebecomingdatetime, with a good number correct already, so it is not a find and replace.I did not find a
date-timethat needs to becomeDATE-TIME. The nearest iscal/alarm.py:173, "the current date-time value in UTC", which is quoted :rfc:9074text and belongs with the copy-paste below.They fall into four groups.
Correct as they are, jCal type identifiers.
prop/dt/types.py:152and:165,prop/dt/datetime.py:171and:180,prop/broken.py:90, the jCal examples incal/component.py:920anddocs/how-to/jcal.rst, and most of the 38 occurrences undertests/rfc_7265_jcal.RFC copy-paste, which #1244 covers.
prop/dt/datetime.py:32copies the grammar ruledate-time = date "T" time, written in the Augmented Backus-Naur Form (ABNF) notation the RFCs use, and:46describes it.cal/alarm.py:173quotes :rfc:9074. These go when those docstrings are rewritten, rather than being respelled.Prose that should be
datetime.attr.py:1179is the clearest one.Internal factory keys.
prop/factory.pyuses"date-time-list"as a lookup key in five places. Renaming it is a code change rather than a spelling fix, and it may be relied on throughtypes_factory, so I would leave it alone unless you want it renamed.Notes
#1645 added
[Dd]ate-times?todocs/styles/config/vocabularies/icalendar/reject.txt, so Vale already rejectsdate-timein narrative documentation. Vale reads onlydocs/**.rst, so it does not see docstrings, and the jCal examples indocs/how-to/jcal.rstsit inside code blocks that it skips.I did not find an existing issue for this, open or closed.
Related