Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: Stefan Claas Newsgroups: sci.crypt Subject: Re: [OT] Unix Time Stamp - Independence Day 2025 :-) Date: Mon, 17 Jun 2024 12:45:31 +0200 Organization: =?UTF-8?b?4oSt8J2UpfCdlKbwnZSj8J2Uo/CdlK/wnZSi8J2UrfCdlLLwnZSr8J2UqA==?= =?UTF-8?b?8J2UsA==?= Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Mon, 17 Jun 2024 10:45:31 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="274235"; mail-complaints-to="usenet@i2pn2.org"; posting-account="uWi4uQdALkj7ETOfPbhNXfz0+Ra/gM5z6/Fa40dJi9U"; Finger: tilde.club/~pollux/ X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 2502 Lines: 45 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. -- Regards Stefan