From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Yuri <yuri@rawbw.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG REPORT] --date argument doesn't validate dates
Date: Wed, 22 Apr 2020 21:26:33 +0000 [thread overview]
Message-ID: <20200422212633.GI6465@camp.crustytoothpaste.net> (raw)
In-Reply-To: <d633919a-99a4-0b90-f355-66a17000f83f@rawbw.com>
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
On 2020-04-22 at 20:40:48, Yuri wrote:
> For example, the following command accepts an invalid month "Dx" and an
> invalid year "20221" and sets the month to "Apr" and the year to "2020".
The --date argument accepts a wide variety of formats, including some
formally specified ones, as well generalized handling through the
"approxidate" approach. So it's designed to operate on formats that are
not well understood and do the best it can with them. This also allows
it do things like ignore the irrelevant word "ago" in "5 days ago" and
still do the right thing.
If you want to be sure that your date is uniformly understood, then the
best approach is to either use the Git internal format or RFC 3339
(which is a profile of ISO 8601).
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
prev parent reply other threads:[~2020-04-22 21:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 20:40 [BUG REPORT] --date argument doesn't validate dates Yuri
2020-04-22 21:26 ` brian m. carlson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200422212633.GI6465@camp.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=yuri@rawbw.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).