A program to compute number of days between two dates?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I mean, does slackware include one in his distributions? In the affirmative case I would like to know its name.
It's a trivial calculation in LibreOffice.
Enter the two dates, then subtract the earlier date from today's date.
83251 days, some 228 years.
Not sure if your objective is to use a cli function specifically or just learn how to do something, but if you just need to make the calculation, LibreOffice is a very easy option.
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309
Rep:
allend,
It seems I’m slightly more cautious than you because my guess which bases on the previous results is: no less than 7 days and no more than 2 years after Slackware 14.0 release:
date --date="September 28, 2012 +7 days" +"%Y-%m-%d"
Code:
2012-10-05
date --date="September 28, 2012 +2 years" +"%Y-%m-%d"
Enter the two dates, then subtract the earlier date from today's date.
83251 days, some 228 years.
Not sure if your objective is to use a cli function specifically or just learn how to do something, but if you just need to make the calculation, LibreOffice is a very easy option.
My sister left on vacations some time ago, not before telling me she would come back in about three weeks. Knowing the date of departure, and today's date, I wanted to know in how many days I should expect her arrival. That was all. But firs I had to do 28 + 14 to find today's date with respect to february (assuming february is infinitely long), and I wondered if there could be some linux command ad hoc. The answer is just 'date'. It does all the work. By the way I found a new linux command: calc.
Looking at your analysis it seems that the most probable is the range 400–499.
Not one release took 400-499 days. The dot frequency chart suggests that the time between releases is more like 200 + 200 days.
Quote:
Originally Posted by allend
This is balanced by the lower extreme of 7 days. Statistically speaking, there is no valid reason to drop either or both data points.
There is also a trend to a longer time between releases.
You're right. If you ignore the two outliers, then a straight line regression would give a high correlation. From visual inspection we would be looking at 200 - 400 days.
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309
Rep:
16 occurrences in the range 0–199 and 17 occurrences in the range 200–399. So none of these ranges is privileged. On the other hand the older releases periods are usually shorter (or very short) and the newer releases periods are usually longer (or very long). So there’s the tendency to prolong these periods. The next range after the mentioned ones is 400–499 and it’s empty so far. According to the overall tendency sooner or later some releases will appear in that range as well. I assume that it’ll happen rather sooner than later. That was my point from post #37.
***
In fact to be fair I should take into consideration the range of the equal size as the previous ones: 400–599. It’s almost empty (one occurrence). Sooner or later more releases will appear here. I say: rather sooner than later.
Enter the two dates, then subtract the earlier date from today's date.
83251 days, some 228 years.
Not sure if your objective is to use a cli function specifically or just learn how to do something, but if you just need to make the calculation, LibreOffice is a very easy option.
Totally agree. Each time someone asks me how to calculate days
between 1784 and today (yesterday an old lady at greengrocer's
asked me exactly that), to calculate the beauty of a Leonardo
painting or make some prediction based in numerology, like "When
a big asteroid will impact with Earth and put an end to all this
idiocy?", I advice to install LibreOffice. Compile it from
source for a better result.
(Just to remember people that Microsoft Office Suite is
indispensable, essential, irreplaceable software).
The red line is the trend obtained from simple linear regression. The X axis is voodoo, and there is no reason to suppose a linear model would work here anyway, but if it did, then the next release is some 340 days after 14.0.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.