From: Jean Louis <bugs@gnu.support>
To: help-gnu-emacs@gnu.org
Subject: Re: even elder races get tired of waiting
Date: Mon, 22 Mar 2021 22:10:20 +0300 [thread overview]
Message-ID: <YFjrnPARl+pnp+t/@protected.localdomain> (raw)
In-Reply-To: <87pmzrkpoa.fsf@zoho.eu>
* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-03-22 21:30]:
> Jean Louis wrote:
>
> > Maybe you should first define what is meant with
> > `days-from-date'. [...]
>
> OK, well, hit me then, what should the definition be?
>
> This is for practical use, how many days till my date with
> Sandra Bullock - because maybe some things need to be
> arranged? ... No? Okay, bad example
Is good example, would we be 30 years back in time. (This way the
warriors will not easily get a clue.)
> But it is also data for the sake of date because it is
> interesting at least to a "datadyrkare" like me
> (untranslatable Swedish pun), e.g. I did
> "Artificial Intelligence" at Uppsala University 2012-05-30,
> that was 8y 9m 20d ago.
For that I use `age' that again uses PostgreSQL:
(defun age (date)
"Returns the age by using PostgreSQL. It is usable to find out
the age of people"
(let* ((command (format "psql -Stc \"SELECT age(date('%s'));\"" date))
(age (shell-command-to-string command))
(age (string-trim age))
(age (replace-regexp-in-string " mon " " month " age))
(age (replace-regexp-in-string " mons " " months " age)))
age))
(age "2012-05-30") → 8 years 9 months 23 days
I do trust the PostgreSQL and that would mean you have lost somewhere
those 3 days, who knows, maybe with Sandra in sauna.
> Now I used 'time-from' (zsh, not Elisp) BTW [1]
Maybe there is some bug in their function.
> 31! ??? Glitch in the Matrix?
I would not know any more, I have given you truthful evaluation on my
side. I was thinking maybe at specific time of the day it would show
one day more or less, and that it was that what is happening. Because
your function is not well understood on my side, I am simply skipping
it and relying on PostgreSQL calls.
> [1] https://dataswamp.org/~incal/conf/.zsh/time
> "Artificial Intelligence" at Uppsala University 2012-05-30,
$ datediff -f '%Yy %mm %dd %Hh %Mmin %Ss' 2012-05-30 2021-03-22 yields
8y 9m 20d 0h 0min 0s and I understand that, but you lost somewhere 3
days.
Maybe you are discovering now bug in dateutils, or bug in PostgreSQL
-- I just don't believe the latter.
Leap years were 2020, 2016, maybe some days are missing because of
that.
Jean
next prev parent reply other threads:[~2021-03-22 19:10 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 [this message]
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
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=YFjrnPARl+pnp+t/@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).