Sujet : Re: [OT] Unix Time Stamp - Independence Day 2025 :-)
De : pollux (at) *nospam* tilde.club (Stefan Claas)
Groupes : sci.cryptDate : 17. Jun 2024, 11:45:31
Autres entêtes
Organisation : ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID : <v4p44b$8bpr$1@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9 10 11
Cri-Cri wrote:
On Sun, 16 Jun 2024 09:43:19 +0200, Stefan Claas wrote:
I wonder what else can be done with the Linux 'date'
command. :-)
Well, I suppose only one's imagination puts any barriers on that. I'm sure
there are ways to, if not by date alone, so by combining date with other
commands to get what you want.
Any ideas how to solve calculating the difference between two dates and
report back years, months and days, like an age of some thing, or a
person?
Like I bought my car on 2015-07-23, how old is it today? And how old will
it be on 2026-07-23?
That type of thing.
Example:
https://www.timeanddate.com/date/timeduration.html
Yes, something like that. Another thing might be to combine the date
output with graphics, or cryptographic related things. I have to think
about that.
I have a Python gadget that follows how that site does it, by excluding
the end date:
$ sky -d2age "1970-01-01--2024-06-16"
54 years, 5 months and 15 days.
$ sky -d2age "1976-02-29--2024-06-16"
48 years, 3 months and 18 days.
(In reality, since start year is a leap year, age is 12.0 years.)
I should really clean that result up a bit. :)
Nice.
-- RegardsStefan