From: Jean Louis <bugs@gnu.support>
To: help-gnu-emacs@gnu.org
Subject: Re: even elder races get tired of waiting
Date: Tue, 23 Mar 2021 01:43:50 +0300 [thread overview]
Message-ID: <YFkdpv02Hi7uccG0@protected.localdomain> (raw)
In-Reply-To: <87y2ee6fhl.fsf@zoho.eu>
* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-03-23 00:34]:
> Jean Louis wrote:
>
> >> I get:
> >>
> >> Lisp:
> >>
> >> (time-from 1964 07 26 0 0 0 2021 03 22 0 0 0) ; 56y 253d 0h 0m 0s
> >>
> >> zsh/dateutils.ddiff:
> >>
> >> $ time-from 1964-07-26
> >> 56y 7m 24d 0h 0min 0s
> >>
> >> (Oh, no, now I see, not even normalized output format...)
> >
> > (age "1964-07-26") → 56 years 7 months 27 days
> >
> > Now we can see that not only you miss 3 days, she misses
> > three days as well, maybe it was the sauna.
> >
> > Jean
> >
> > P.S. Who is right, PostgreSQL or diffutils?
>
> Let's see ... don't we have any software to answer
> that question? :)
>
> The Lisp [1] cannot be easily normalized because `format-seconds'
> do years and seconds but not months:
>
> Use format control STRING to format the number SECONDS.
> The valid format specifiers are:
> %y is the number of (365-day) years.
> %d is the number of days.
> %h is the number of hours.
> %m is the number of minutes.
> %s is the number of seconds.
> %z is a non-printing control flag (see below).
> %% is a literal "%".
>
> Do it all into days only? Then I can use my other Lisp [same
> file]
>
> (days-from-date "1964-07-26" "2021-03-22") ; 20693
>
> And the zsh [2]
>
> $ time-from 1964-07-26
> 56y 7m 24d 0h 0min 0s (20693 days)
>
> and... *drumroll*
>
> (= 20693 20693) ; t
>
> Oh no Jean, this doesn't look good for you :)
Hmm:
$ date --utc -d 'jul 7 1964 +56years +7months +24days'
Wed Mar 3 12:00:00 AM UTC 2021
I am not sure if you have tested it on Monday or Tuesday, today.
Your function was showing yesterday Monday the difference of 56 years,
7 months and 24 days from 1964-07-26, but `date' command tells that
difference comes tomorrow, Wednesday.
That is discrepancy to my result from PostgreSQL and your result with
datediff.
We have to find solution that works, as no Sandra wants to be called
older than she is.
Jean
next prev parent reply other threads:[~2021-03-22 22:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-20 20:37 even elder races get tired of waiting Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-21 14:01 ` Jean Louis
2021-03-21 14:19 ` Jean Louis
2021-03-21 15:12 ` Jude DaShiell
2021-03-21 17:10 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-21 17:29 ` Jean Louis
2021-03-21 17:38 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-22 7:21 ` Jean Louis
2021-03-21 22:30 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-22 7:48 ` Jean Louis
2021-03-22 18:29 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-22 19:10 ` Jean Louis
2021-03-22 19:47 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-22 20:31 ` Jean Louis
2021-03-22 21:33 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-22 21:40 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-22 22:43 ` Jean Louis [this message]
2021-03-22 23:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-22 23:38 ` Jean Louis
2021-03-22 23:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-22 8:42 ` Jean Louis
2021-03-22 18:31 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-22 19:21 ` Jean Louis
2021-03-21 17:13 ` Jean Louis
2021-03-21 19:24 ` Jude DaShiell
2021-03-21 22:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-22 7:54 ` Jean Louis
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YFkdpv02Hi7uccG0@protected.localdomain \
--to=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).