[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#971977: debian-policy: debian/changelog date syntax description inconsistent/ambiguous wrt. to day of month



Package: debian-policy
Version: 4.5.0.3
Severity: minor

Triggered by writing https://bugs.debian.org/971975 against lintian
(which actually was triggered by writing another bug report, #971974
:-), I noticed that in

https://www.debian.org/doc/debian-policy/ch-source.html#debian-changelog-debian-changelog

the description of the date format is inconsistent or at least ambiguous
with regards to how many digits a day of the month can have and if there
should be a zero or a space or nothing prepended to single-digit day of
months.

Especially this item made me rise an eyebrow:

> * dd is a one- or two-digit day of the month (01-31)

Now what? Are one-digit day of months allowed or must we use "01" to
"09" for single-digit day of months? And the commonly used leading space
for one-digit days of months are not mentioned anywhere.

At least the "01-31" in parentheses clashes with "one-[…]digit day of
month" in the beginning of the item. (Or does "one-digit" refer to that
the number of the day of the months can be (obviously) one digit, but
does not refer to how it's actually written? If so, this should be
clarified.)

BTW: The "date -R" mentioned in the footnote 7 uses leading zeros, at
least in Debian Sid and my timezone. (Not sure how much locales play a
role here. Actually I would expect that the shouldn't play a role in
this case at all.)

RFC 822 does not mention leading spaces:

https://tools.ietf.org/html/rfc822#section-5

But RFC 5322 seems to allow and recommend them over using only one digit
for a single digit day of month — at least if I interpret the meaning of
"[FWS]" and the according paragraph correctly:

https://tools.ietf.org/html/rfc5322#section-3.3

I'd be happy if that part of the policy could be made at least
consistent and unambiguous, e.g. by explicitly allowing all or only some
of these three formats (two characters with leading blank, two
characters with leading zero, single character). Thanks in advance!

Note: I actually have no real preference if single-digit day of month
without leading space should be allowed or not. I just want it to be
consistent and unambiguous. I though did a short check how often
single-digit day of months without leading space or zero are present,
and on my Debian Sid desktop I found about 2300 occurrences:

$ zegrep '^ -- .*  [^ ]{3}, [0-9] ' /usr/share/doc/*/changelog.Debian.gz | wc -l
2318

A leading space is clearly more often used than without, but leading
zeros are clearly in the overall majority here:

$ zegrep '^ -- .*  [^ ]{3},  [0-9] ' /usr/share/doc/*/changelog.Debian.gz | wc -l
51072
$ zegrep '^ -- .*  [^ ]{3}, 0[0-9] ' /usr/share/doc/*/changelog.Debian.gz | wc -l
137070

(Not counting those few changelog entries with non-policy-conforming
*four*-letter day of week abbreviations which the mentioned bug reports
#971974 and #971975 are about. :-)

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (600, 'testing'), (500, 'unstable-debug'), (500, 'buildd-unstable'), (110, 'experimental'), (1, 'experimental-debug'), (1, 'buildd-experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.7.0-2-amd64 (SMP w/4 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

debian-policy depends on no packages.

Versions of packages debian-policy recommends:
ii  libjs-sphinxdoc  3.2.1-1

Versions of packages debian-policy suggests:
ii  doc-base  0.10.9

-- no debconf information


Reply to: