From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Shorter and more flexible implementation for parse-time.el Date: Sun, 25 Jul 2021 16:58:18 +0700 Message-ID: References: <87mtqb3o7q.fsf@gnus.org> <87lf5uzyt0.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31669"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Emacs developers To: "Guu, Jin-Cheng" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 25 11:59:16 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m7auh-000850-Pc for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Jul 2021 11:59:15 +0200 Original-Received: from localhost ([::1]:60492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7aug-00034p-S8 for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Jul 2021 05:59:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7au2-0002Oa-7A for emacs-devel@gnu.org; Sun, 25 Jul 2021 05:58:34 -0400 Original-Received: from mail-vk1-xa33.google.com ([2607:f8b0:4864:20::a33]:44968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7au0-0008By-Kr for emacs-devel@gnu.org; Sun, 25 Jul 2021 05:58:33 -0400 Original-Received: by mail-vk1-xa33.google.com with SMTP id r2so1366087vkl.11 for ; Sun, 25 Jul 2021 02:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=61ky2V/cF8QPlyZRsgRl5ihBzlkymDpWfuAyDex+w6g=; b=KBBpX4PkZHFITd41tNDVtmhcOwyaHYEvlfvWDmbD5/EmZYGWgQni0GF555EGf4YLRS jEAccCjebJvJR09ukzSwu1AH2JCY0qdZD8/fVFmrQZbqg6Jaj8ILCdOJQaqqVDbp/LGD JVMYZNwIniWTPSHaPSKexmqwUZb+Zt5zwwuFBmSGjMF/x8WHxwoC9y8gRs7eWNUqxlDC UEf4zBIc/KlR/I9AicCKQvcri5B8HqvZvHqcjn8uhxJLapk+ayQhosz+W2v9wUdeRZ1c e+DyxQiHRCGXNXqhqCGHuA4iMLn50r+lu2vooR/8HlzGL/upjL8P8ftjWXkQzgnUC6zj DO1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=61ky2V/cF8QPlyZRsgRl5ihBzlkymDpWfuAyDex+w6g=; b=jkj1UrhzHfZzHB3kmeQe7N87yYCeDZsk1vbofNEABvZPCHOEzjvu/onYEw9w4A++gW s4B7AbrJ7JHWaL4ZgRsKYHcKy/UE09YSB7262RUBSF49mJq2YmZP9vo011FiBnswcN9+ Fq7d0POYVoYCC3ysIGqgv3eB4X9bteiMOf+nxnrTiwuPOHmat6QCYrxq6FgRlz2/qb+S mXS3oB9P8AOZ8AFRq18GZFDjgCaFpN0rzM4fPddMAz9dggOmk3ZBvO9u5QfYtHk9tTXs CB7SFHDljlmxoWxP4QJnSu4rsnw1XVSUxITg1cQ6+qvOKny5oLbK/WO9a/U6qWRKgNha 0hyw== X-Gm-Message-State: AOAM530YNwFMCtAJ56ci9Mbj03vFrb7mboHgMQDba3N0bm3uZ4Fr4nfx bugeuXwS5bk76Muy7N7bIgPMoHNoDQ9m74He+4k= X-Google-Smtp-Source: ABdhPJxSh7G2wQk2hkVqcy3o5gv6oiRxbLhnCB+MAEtiIpmEHXhfg+7lgil+QAAjOnFcJmXb1seq2wk4PQYpaE4F8P4= X-Received: by 2002:a1f:78c6:: with SMTP id t189mr1882514vkc.7.1627207110413; Sun, 25 Jul 2021 02:58:30 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::a33; envelope-from=yurivkhan@gmail.com; helo=mail-vk1-xa33.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271594 Archived-At: On Sun, 2021-07-25T16:38, Guu, Jin-Cheng wrote: > And you're totally right, date parsing as a whole won't be easy. In > general we would hope for a parser that is smart enough to deal with > flexible formats. However, some specification needs to be given at > some point - for example "01/01/01". That is why I came up with an > assumption that I think is general enough but also can have a definite > output. The right way to solve the date parsing problem is by getting everyone on ISO-8601, not by learning to parse every existing format. https://xkcd.com/1179/