GNU bug report logs - #52525
wanted to add option to date command to handle pure numeric input in varying ways and output for invalid dates

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: Mike Marchywka <marchywka@HIDDEN>; dated Wed, 15 Dec 2021 21:58:01 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 52525 <at> debbugs.gnu.org:


Received: (at 52525) by debbugs.gnu.org; 15 Dec 2021 22:40:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 15 17:40:47 2021
Received: from localhost ([127.0.0.1]:33942 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mxcx5-0001tg-8D
	for submit <at> debbugs.gnu.org; Wed, 15 Dec 2021 17:40:47 -0500
Received: from mail-bn8nam08olkn2024.outbound.protection.outlook.com
 ([40.92.47.24]:45280 helo=NAM04-BN8-obe.outbound.protection.outlook.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <marchywka@HIDDEN>) id 1mxchM-0001TN-0t
 for 52525 <at> debbugs.gnu.org; Wed, 15 Dec 2021 17:24:32 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=RJ8eLuK+QlYFZk/NSmAT1mYPBpmAAiKbuFjoPMqV7PdtCGEbLMj0LdUjO/xz74AMs6jbwKQn7wU3A7iw4kS/izFAk3hM61l+zd3Z6lSwAgsM7Es/MZjoWq5iv89pzRiYuxLpqCUbu/S14V3cU0dYyQ1D2PDFIHDzHQ3/OBtNXeMUATPsGHM0p717dxQ3XANRq8ZRvo4dSbKoRnMnTZJkstTMZOcdloRNQLRpD8FidxSRPEZlTFHIJUFuAcTToYA2BDbXMZ2GCid2IUMdVwC/v1YAiC0JhbRbbHSf3msRheEIBXWqIx9ym+RfjmKu5UzZ3or8IOyxgKx5HalTse2PQA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=1bRijqcpDN8ObnqQLqurZb4R7z2/LqJ2lF4P/7ih32M=;
 b=YAwUoXifMaZUqt6yZyRSveQyb1XPpuxvj06zVYBVsNKwh0ftRMz4vnG6OjOslh8SYBPLGnBoupP5QLI9bznTd4dM/h3/CFMnuot/j+7/yb64GJ244zg6dSs8uuirDMCv7smQGBTyfF0SifSidhKwrOp6MDqSspDeI658JM5uZ2vq7KyFiueiByM4xsIhhbAJ8rFpdn/luNbEaYq/OKuLQGjcoZp4OZIGsc4GtHvcLjq+03HgjRlL2WGLt+Xf7wcyAKvv1Nua3E1wlMjdBilb9z/07t9IfriZZ1uHWYTDow+CxY5ukb0ut2+5vcPDedWQNHORGXvsWQSP1DwdBu+DLA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=1bRijqcpDN8ObnqQLqurZb4R7z2/LqJ2lF4P/7ih32M=;
 b=BKTLwfq83whAx3vVukJamknfLKjsYqj9duFXPwQJz13x1Lfw3v9vQoMosN7x0GFSctHgDrd8bnBDfdewvEFN1J45qV50rrlr2TMYGc7nvScAGaTKjNfJZvh7k5YJ2hXPj3jbmS6c/tMBouLeWoH3taMlIQIkEbPmZd4K14foKpiXDOcdlzQwmZa3YpEkr2rnBumZhwLzTrewyCuF2UrVYPeNu7GdQHSdxUCngmiWKmNgeH9febLFostMDYkqZpmnSCH32m7yIfBAye9aJX0AyxgezeGpjY0j8mcTpbPf1QBg3rpXmWqW5VXrj9WSJIz+9oEY2xLWTOZUeuic9XK4+A==
Received: from BN7PR08MB5571.namprd08.prod.outlook.com (2603:10b6:408:3d::26)
 by BN8PR08MB6226.namprd08.prod.outlook.com (2603:10b6:408:de::18)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14; Wed, 15 Dec
 2021 22:24:24 +0000
Received: from BN7PR08MB5571.namprd08.prod.outlook.com
 ([fe80::89e8:b704:e362:74a3]) by BN7PR08MB5571.namprd08.prod.outlook.com
 ([fe80::89e8:b704:e362:74a3%3]) with mapi id 15.20.4778.018; Wed, 15 Dec 2021
 22:24:24 +0000
Date: Wed, 15 Dec 2021 17:24:22 -0500
From: Mike Marchywka <marchywka@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>, 52525 <at> debbugs.gnu.org
Subject: Re: bug#52525: wanted to add option to date command to handle pure
 numeric input in varying ways and output for invalid dates
Message-ID: <BN7PR08MB5571AD57FD9BC07A753CD48DBE769@HIDDEN>
References: <BN7PR08MB5571CCE76CB62D8DD9A31CCEBE769@HIDDEN>
 <BN7PR08MB55717506A5B39838E986288BBE769@HIDDEN>
 <e716cd77-7d02-24da-ed12-55159501cf67@HIDDEN>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <e716cd77-7d02-24da-ed12-55159501cf67@HIDDEN>
User-Agent: NeoMutt/20171215
X-TMN: [hc18PT/HYE2Any08djaG/jhwUdY4wwGF]
X-ClientProxiedBy: BN0PR04CA0202.namprd04.prod.outlook.com
 (2603:10b6:408:e9::27) To BN7PR08MB5571.namprd08.prod.outlook.com
 (2603:10b6:408:3d::26)
X-Microsoft-Original-Message-ID: <20211215222422.emg5loyatl2sirze@happy>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 8aee835b-43ec-4580-c3ff-08d9c019a5eb
X-MS-TrafficTypeDiagnostic: BN8PR08MB6226:EE_
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: G3Sk2/oXM5FCwiqGy3V5Tig3kd+QcH8NbRm0xKBMRsFCpIoToI1Lh30Of9FsUIObU2f4jomuYMa0G62ECVYXilqNCF5Vb6BhTN3n5KumqKSIHS7ZQnehKNLL3iiX19wiWIvRIdKOLc2hVNJEhCPS+xuYecjPGdYGDcCxSkccf5jfS89N0omg54p93IErY+XuTJw+lYXqR6O8tnWPleiS8QOVsHfXLf2f3GNUnItgOakd35421BMAxh8XPVMk01/KTZOIe/pE7/POvrIu8K59zJkcvuZcJSYIcNCNbhlO2Jc0izMf2aUW3JZ4xX78z/Xl7bjTj5D8KU/fl9X8hWP4Fr32TTF/hGkMUab48TLe5zYjYYoxtGwW+C8C+MDfUdasBbb2Yfnm5aErtBc/11jMnlrWpgX6Hn9yuStSQnZQk8k7OFuAseBfNsnup6GPi5ZkMMZUeFYS8XjccJwG0iJnodEX9HrnQKC5mZsfM/duV/HzB8WoM8LA51NKWhXhGrZG8cKUTAsuwP63e1MNJE/xgkJCqCFkr7WflZNi/h7f9yDvmtoS/HE0ixBtJbA2XQ8o1PPOYLq2TDwJ5V/wDey3IQ==
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zdL07dtH4tSH93GvxpswZd/GtBh4lgqvmCnt0ZAZEHRiooaGTuX2gebUTyZe?=
 =?us-ascii?Q?n+JFlKwsmZKfE0b/iLT1dlr+7AKlD60y8U6idlB9X5z0vWQfAF1Nq831kkKw?=
 =?us-ascii?Q?8o1/J3BAq6jrAtO5qlK8VmBAaBLlPC9tWITPNf4+jO+yIeD+QfqVY157SreC?=
 =?us-ascii?Q?KieH7Jg437DaYalt1WLegUzsC5VGtDxF6tq5czYCNl1Z3rUK1hMDXExNI9v8?=
 =?us-ascii?Q?PSSG42NCq+SR9ZjAQ8rrtDF+EUJXXm1+VOHEdQjVDLzo2QMr15/0JiDZAj8Z?=
 =?us-ascii?Q?8ZLQzClPoCNE4GS94wk80MW7sslmo1DEOIbW9KSLF4m0XhT55MN9XoOF5XcJ?=
 =?us-ascii?Q?Cwm/MoEvjhQts4RN/KxSb3UJGueQJ+Srd4uQtRJy58DP3a5YJjMZdX2BU7pJ?=
 =?us-ascii?Q?urvuhQSyj2DRl5AYRDj+adO6g7Bepm5FcBeHSndxJzUz4AjDxGIxtsb3Xaog?=
 =?us-ascii?Q?v2KP+da4aI0WGk6WtNfYPivNLzgpiObg3wrxNYTilmM1XOnJY1Hs47vVJgNj?=
 =?us-ascii?Q?pp3Ma8QXhKK0j5Txl2ZGxQL6QjX5TEWSDV/bg7afMwNMTN5j2FGNyaC9hFsj?=
 =?us-ascii?Q?MDwCkByG6+BYFGn3VoBtc3VAvTLusayqBzASgCjiAWf5qIJa6QNAsXFlo7FL?=
 =?us-ascii?Q?u90SqBV+RNcjtF69LLU6Sgq8chfJkfahhi1UA5li3UlxsJjagDq1EpQW3mFw?=
 =?us-ascii?Q?tUkV9qWy4z0VkKQGQblm/m4Kt7P4VrzawPkQ/9SiAiUqggAM06X9I1UmoU2X?=
 =?us-ascii?Q?CnqI4sVMt1j1MofGjY2k2/6GO41vyeUBb405VkeXukEjIuzZ4PEtOzxCOkIX?=
 =?us-ascii?Q?na4g/c5TsQU60Efe/xFin154HkwzTofLAfVjnX2r3i+SCvsNWGGfc6pQ5yO8?=
 =?us-ascii?Q?HAnqtCx6I3LHjJ12jK7prcsPC0d0Y6o6xLD/Y2ElUktleFb7/qQSwxRZUsnV?=
 =?us-ascii?Q?O4r9zw9fQAU7qlmJQUl7sg=3D=3D?=
X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-c65ed.templateTenant
X-MS-Exchange-CrossTenant-Network-Message-Id: 8aee835b-43ec-4580-c3ff-08d9c019a5eb
X-MS-Exchange-CrossTenant-AuthSource: BN7PR08MB5571.namprd08.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2021 22:24:24.6879 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR08MB6226
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 52525
X-Mailman-Approved-At: Wed, 15 Dec 2021 17:40:45 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, Dec 15, 2021 at 02:09:29PM -0800, Paul Eggert wrote:
> On 12/15/21 12:39, Mike Marchywka wrote:
> > $echo 2000 | date +%Y -f-
> > 2021
> 
> How about this instead? The idea is to avoid
> adding features if they can easily be
> implemented with some other standard utility.
> This way, you can write your shell scripts now
> rather than waiting for a future fix (plus, it
> keeps 'date' simpler).
> 
> echo 2000 | sed 's/$/-07-01/' | date +%Y -f-
> 

That is great until the input format is YYYY-MM-DD :)
The point of using date was to get all the internal
stuff that deals with ambiguous formats and probably
a lot of other people do that too.  
The info documentation does point out how ambiguous
the human readable dates are. I guess 2000 could also
be ms since epoch. I am calling date from c++
and could just ias easily wrap it in another c++ program
to deal with this but thought it was of more general
interest and I did not want to make another kluge.

Generally I agree with your approach but if date is
going to be a swiss army knife for date conversions
it makes some sense to allow user selection of
ambiguity resolution doesn't it? 

Thanks. 




-- 

mike marchywka
306 charles cox
canton GA 30115
USA, Earth 
marchywka@HIDDEN
404-788-1216
ORCID: 0000-0001-9237-455X




Information forwarded to bug-coreutils@HIDDEN:
bug#52525; Package coreutils. Full text available.

Message received at 52525 <at> debbugs.gnu.org:


Received: (at 52525) by debbugs.gnu.org; 15 Dec 2021 22:37:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 15 17:37:56 2021
Received: from localhost ([127.0.0.1]:33939 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mxcuJ-0001pB-RZ
	for submit <at> debbugs.gnu.org; Wed, 15 Dec 2021 17:37:55 -0500
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45032)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1mxcuH-0001ov-W7
 for 52525 <at> debbugs.gnu.org; Wed, 15 Dec 2021 17:37:54 -0500
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id B694916010D;
 Wed, 15 Dec 2021 14:37:47 -0800 (PST)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id 38C038bG968R; Wed, 15 Dec 2021 14:37:47 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1834716011C;
 Wed, 15 Dec 2021 14:37:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id rhZI-9KrqY30; Wed, 15 Dec 2021 14:37:47 -0800 (PST)
Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com
 [172.91.119.151])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E46A616010D;
 Wed, 15 Dec 2021 14:37:46 -0800 (PST)
Message-ID: <31bc1621-8c99-9f47-2dab-1034505ff7f0@HIDDEN>
Date: Wed, 15 Dec 2021 14:37:46 -0800
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.3.1
Content-Language: en-US
To: Mike Marchywka <marchywka@HIDDEN>, 52525 <at> debbugs.gnu.org
References: <BN7PR08MB5571CCE76CB62D8DD9A31CCEBE769@HIDDEN>
 <BN7PR08MB55717506A5B39838E986288BBE769@HIDDEN>
 <e716cd77-7d02-24da-ed12-55159501cf67@HIDDEN>
 <BN7PR08MB5571AD57FD9BC07A753CD48DBE769@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Subject: Re: bug#52525: wanted to add option to date command to handle pure
 numeric input in varying ways and output for invalid dates
In-Reply-To: <BN7PR08MB5571AD57FD9BC07A753CD48DBE769@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 52525
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.4 (---)

On 12/15/21 14:24, Mike Marchywka wrote:

> if date is
> going to be a swiss army knife for date conversions
> it makes some sense to allow user selection of
> ambiguity resolution doesn't it?

There are thousands of possible data conversions and I'm not sure we 
want to head down the road of trying to handle them all.

That being said, this particular conversion might be worth the trouble. 
However, 'date' uses the same date parser that a lot of other GNU 
programs do. Surely if there's a change to be made to date parsing it 
should be made there, not just to 'date', so that all the other programs 
can use the new functionality.




Information forwarded to bug-coreutils@HIDDEN:
bug#52525; Package coreutils. Full text available.

Message received at 52525 <at> debbugs.gnu.org:


Received: (at 52525) by debbugs.gnu.org; 15 Dec 2021 22:09:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 15 17:09:40 2021
Received: from localhost ([127.0.0.1]:33903 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mxcSy-0007Lk-4O
	for submit <at> debbugs.gnu.org; Wed, 15 Dec 2021 17:09:40 -0500
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41570)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1mxcSv-0007LV-9j
 for 52525 <at> debbugs.gnu.org; Wed, 15 Dec 2021 17:09:39 -0500
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2896E16010D;
 Wed, 15 Dec 2021 14:09:31 -0800 (PST)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id FekGfbtFjJyP; Wed, 15 Dec 2021 14:09:30 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7B78916011F;
 Wed, 15 Dec 2021 14:09:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id c67EuH-A8_5k; Wed, 15 Dec 2021 14:09:30 -0800 (PST)
Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com
 [172.91.119.151])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 53D3A16010D;
 Wed, 15 Dec 2021 14:09:30 -0800 (PST)
Message-ID: <e716cd77-7d02-24da-ed12-55159501cf67@HIDDEN>
Date: Wed, 15 Dec 2021 14:09:29 -0800
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.3.1
Subject: Re: bug#52525: wanted to add option to date command to handle pure
 numeric input in varying ways and output for invalid dates
Content-Language: en-US
To: Mike Marchywka <marchywka@HIDDEN>
References: <BN7PR08MB5571CCE76CB62D8DD9A31CCEBE769@HIDDEN>
 <BN7PR08MB55717506A5B39838E986288BBE769@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <BN7PR08MB55717506A5B39838E986288BBE769@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 52525
Cc: 52525 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.4 (---)

On 12/15/21 12:39, Mike Marchywka wrote:
> $echo 2000 | date +%Y -f-
> 2021

How about this instead? The idea is to avoid adding features if they can 
easily be implemented with some other standard utility. This way, you 
can write your shell scripts now rather than waiting for a future fix 
(plus, it keeps 'date' simpler).

echo 2000 | sed 's/$/-07-01/' | date +%Y -f-





Information forwarded to bug-coreutils@HIDDEN:
bug#52525; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Dec 2021 21:57:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 15 16:57:30 2021
Received: from localhost ([127.0.0.1]:33878 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mxcHB-0006xz-JZ
	for submit <at> debbugs.gnu.org; Wed, 15 Dec 2021 16:57:30 -0500
Received: from lists.gnu.org ([209.51.188.17]:51362)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <marchywka@HIDDEN>) id 1mxbMk-00012R-60
 for submit <at> debbugs.gnu.org; Wed, 15 Dec 2021 15:59:10 -0500
Received: from eggs.gnu.org ([209.51.188.92]:39008)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <marchywka@HIDDEN>)
 id 1mxbMh-0005iD-L7
 for bug-coreutils@HIDDEN; Wed, 15 Dec 2021 15:59:09 -0500
Received: from mail-dm6nam11olkn2089.outbound.protection.outlook.com
 ([40.92.19.89]:21251 helo=NAM11-DM6-obe.outbound.protection.outlook.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <marchywka@HIDDEN>)
 id 1mxbMe-0005Hb-T4
 for bug-coreutils@HIDDEN; Wed, 15 Dec 2021 15:59:06 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=oR6CzN8qiOq77pyGnEpea2mMHLCVyiv1IZ89dZ33k8tOzXdp6BN91sp7gMt2q1KODayOAvrDouYhbqcsdgktUEok5kvy6RjkC8Ux/G2behX6mPLm2/PgrhMG8QSBHcuSdfvKoMKAGPyas7vIenDUqn7fXB1b6AZ/yMJ0sIwP5rDemqPWJovZ/rEzMV4NTvm0uzBfyHNCJ0/8F0Se8aZFQAujx263oAfoU+HQoliGBA2r95jX6yHMdyNCR8mWxF8A4YCGDlDukiyOiiMW/pM/J5mOLf4u1eulVlV0ZTFNv60Fdy9ZQr9/m80hOtK4Ru1TxbjA5gt3NH+4+GG+/3veMQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=4WO8KlPLBkUtDJPMQVEH7Hg+E9S0RLGujge7Z6FHMzk=;
 b=WUqTtwhZ784U9Xm+8gyNt+2cI9o40ZQs1RBxLcJg++1wUBJg5YIXmU/DnxzIPSAEyqdz34mcasAmoCk+A6TEs2KXalKVE3q9JbGYn2HocfEQElTQCUgRsfCZBzqOIeTXMq/hx4jypr6cUP6kl4xzLgzRkNAdtJ/uiwlnnyTzdqkIiKwr0DMbxoEJDhbgStAQH3ON09kRu5t3UE0Ibmm76mjdpSWnelWqS371Djjj7u8Bo5Zd/kQhr8z6fvvRLvGa0qyLPAcmzh8+2daV2y/IlZFl3osytVT7mPygpmh8YWC+xq/HWGXd38jICg/hqfnar1qplRY+UyzWW7gl+8u/9w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=4WO8KlPLBkUtDJPMQVEH7Hg+E9S0RLGujge7Z6FHMzk=;
 b=ne1GMPucB6B/fSM5LYxI8c29II14XEt8wE8unaE3yVIW07ppN552N+V2f+vEkQpFqFR/EIZfhut604mmiHx03RicVh+gaAMU+4W9PLMKMkWK6eslBO7MVVQel9RZO0xnqDTiRtB7mXgqjj9V+cvpIKlSWXiWEG3D25IQTLWJyBjkrTFQ0CzfTge+WLj7ZLY/hQFCTADfFdYt9X3o190RDPylPfi7UAi8Yi30V57gAh6rpV8imJFIW+rU0Ij4iOuTKf9mdO/tqwGz/YeCPYsbjCo9rgGSVWeQlebnTeciV50GQia08/38wZlCANi79tOyoGH0Go7HhIT1VuQv/0zcjg==
Received: from BN7PR08MB5571.namprd08.prod.outlook.com (2603:10b6:408:3d::26)
 by BN7PR08MB4435.namprd08.prod.outlook.com (2603:10b6:406:f1::10)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.17; Wed, 15 Dec
 2021 20:39:04 +0000
Received: from BN7PR08MB5571.namprd08.prod.outlook.com
 ([fe80::89e8:b704:e362:74a3]) by BN7PR08MB5571.namprd08.prod.outlook.com
 ([fe80::89e8:b704:e362:74a3%3]) with mapi id 15.20.4778.018; Wed, 15 Dec 2021
 20:39:04 +0000
From: Mike Marchywka <marchywka@HIDDEN>
To: "bug-coreutils@HIDDEN" <bug-coreutils@HIDDEN>
Subject: wanted to add option to date command to handle pure numeric input in
 varying ways and output for invalid dates 
Thread-Topic: wanted to add option to date command to handle pure numeric
 input in varying ways and output for invalid dates 
Thread-Index: AQHX8fPMhndG5Ke4MUuKs6qvFhRRKg==
Date: Wed, 15 Dec 2021 20:39:04 +0000
Message-ID: <BN7PR08MB55717506A5B39838E986288BBE769@HIDDEN>
References: <BN7PR08MB5571CCE76CB62D8DD9A31CCEBE769@HIDDEN>
In-Reply-To: <BN7PR08MB5571CCE76CB62D8DD9A31CCEBE769@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
suggested_attachment_session_id: cc4b3764-b2f7-ba5e-ff9b-ddcbd79ae05f
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [nbbEWNqPErXDQ6oEbnaZBucmhZzitzIj]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: a86bc55b-7823-45da-4ae5-08d9c00aef37
x-ms-traffictypediagnostic: BN7PR08MB4435:EE_
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: DUftMnFC7Qk584sjBe8iYl1E/WHgZRN3bhI1Op3y5v4xAXDwY81nCmP6BddbvYmVFsLvedIJJGSooJnHANmfsyBoq6O098XeCtjaxBgp2omWatIdnGtO/s2rNsdEp1kRx2j8xrd6QC9U2UFcTXChdPIEcraQay/bYonSOHsAUpegae2SfdRcU8avDO393zcM9vUWpS0JnUyRksxN5SyEETfahbMcOcJNBfU+Vo1IcwdxgpkVuT3AHiAifR0TPZfKpGaOobSsk3oAflufRDcc+woXnFYv7M0KUO2IDuZlsFg7SLF/7D5PEvZB5GY2HUqfLD/1CQra5sDYGp2YKYex2K0BZZMuktKgvlcvoR2pkWmm6Ac6qMwR4XYO4LKJCPYCRqelJCDtHg6hJEgdUGuoLUiapeOQ12SBAYi4iJPB1moiDn6pCSnvOLp1EBZgXso02NkgsUN3k/HoRgtJjHOOBLEg7EYTePyr+KLXsTocbCNfdSBE++l2I0wkalDeamxCbPOAvaUgNSkADeOvpRf9dKrZvp0GTD7+j1Cxao5/XhuuBP1rpM9wc0o+z0JinlFv3vRKKRy7/JD+nWjSSjU8Ig==
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: UIg0p7mWlEb3ARA9Cn1++rPbiJO1ao9eBOyHylNwGqufKYFOBVfgaM9mACizdBY8/W2sNPcBRLEv4S0ARmZWcZgAGAfsz6CbIJKKYiZa+ER7pDAcjZh01+GHyuQFS39+nMQkad6UdfVzxZn1LgqtPktJbmM4uQYJEoz/aQ/a7P5m0mPeIeAR/AwskcxThP+ie+2gu8YcDib3PcVHNS79f7GRFC501KkhwgsfHwY8LIneGY7p2CRNmf7K1UKFD8QPN8Oq2TrkypXMVMFo8/cnjnrdV998r6v823wKY+tGumDEuMn47t2uvjQhbC3gtXVkTd6RZGtHE6Go01cBevRGIpAoqNJP9OZ2vjcYWllZRu34iRGq/lEhOm11PJh7IcQS6MtLRj2aRitRiNX0iuzrkw/N2LCRzDf0Fh1lwzYPg5VCU0xqtDIa8tCU/DT8eE2PO5eS9WIxHXqYkRCjIAR745z6B+xffExwTaYAkUOuag4AIdANHdTF4838TrRZZlnTUwidd0XLZalSnX/CE2Hj6ogrrtZf3Q+F+Arh+ASyA2RCSQ5TQWHR3A5TEuwN/revVa3V871mdtRiYnfM8HBkdbMkat4j0niN7lQKm+ydctnl1YN4cok1CPRlG4DJeGooRLZ89ifWXiV0Jd2K/FTTi7x5dtod3ptABs7zRz5/dor5OqAEg1BB0PqL1tzmpJb3WwBCmGn5oKP1SIaVXp+DqSSyqQhusQrNR2Hp9JtC7tNWg++35BPewX7iK+l/UTs9iS7VbnAd1ebk5zJXQNHtRAnKA8al2b74+UfAiNZKB0kvbKn5kQ4byDOp3mNbRbYzBiBlY7hEzz7iz0jAR/GhIe863rFVs0pC8n//+Or7KqyOjgaAiMFYB4pNiPynurjghiwOD+AFUCk3aw28c/zux2oaw2BnKIxaJsXRjrtO1VtFxd9FaI9aI6GHT8dR1Kjf
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-c65ed.templateTenant
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BN7PR08MB5571.namprd08.prod.outlook.com
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: a86bc55b-7823-45da-4ae5-08d9c00aef37
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2021 20:39:04.4930 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR08MB4435
Received-SPF: pass client-ip=40.92.19.89; envelope-from=marchywka@HIDDEN;
 helo=NAM11-DM6-obe.outbound.protection.outlook.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 15 Dec 2021 16:57:28 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

I'm trying to implement the options shown below. I downloaded the coreutils=
 source=0A=
for my distro and don't expect a problem compling and implementing it.=0A=
However, is there any interest in adding similar functions to the main code=
?=0A=
=0A=
I would imagine something like,=0A=
=0A=
date  --option=3Dfour-digits-are-YYYY,invalid-output-blank-line =0A=
=0A=
My immediate concern is getting this to take the input as a year rather tha=
n HHMM and=0A=
it would be easier to make date more versatile than put logic around it,=0A=
=0A=
$echo 2000 | date +%Y -f-=0A=
2021=0A=
=0A=
not sure if anyone else would want that.=0A=
=0A=
Thanks. =0A=
=0A=
=0A=
=0A=
=A0Mike Marchywka=A0=0A=
306 Charles Cox Drive=A0=0A=
Canton, GA 30115=0A=
470-758-0799=0A=
404-788-1216=A0=0A=
=0A=
=0A=
=0A=
=0A=
________________________________________=0A=
From: Mike Marchywka=0A=
Sent: Wednesday, December 15, 2021 2:08 PM=0A=
To: coordinator@HIDDEN=0A=
Subject: the ubuntu "date" command info pointed me to you, question on modi=
fication=0A=
=0A=
I wanted to add an option to the linux date command to=0A=
deal with pure number date stings - allowing for a 4 digit number=0A=
to be a year instead of HHMM - which should be easy=0A=
for me to do but I wanted to see how it integrates.=0A=
Also, I wanted an output option, that I could write, to=0A=
send an invalid message to stdout instead of stderr.=0A=
=0A=
How should I proceed?=0A=
=0A=
Thanks.=0A=
=0A=
=0A=
 Mike Marchywka=0A=
306 Charles Cox Drive=0A=
Canton, GA 30115=0A=
470-758-0799=0A=
404-788-1216=0A=
=0A=
=0A=




Acknowledgement sent to Mike Marchywka <marchywka@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#52525; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 28 Jan 2022 02:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.