Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Doesn’t between just return the number of whole months between the months of the two dates?
-
iiii90854yRead the documentation for 'between'. There's even a similar example and explanation, why it works like this.
https://docs.oracle.com/javase/8/... -
@gomsim What is a whole month? 31 days? 28 days?
If you subMonth() on March 31 in PHP's Carbon library for example, you get 31 February... Which is then converted to March 2 or 3, depending on leap year.
I propose we start using metric time and Unix Timestamps. Not just for computing, but also in real life.
I'm going to lunch, see you in 2 kiloseconds. -
@bittersweet I don’t know. It was just a thought. But I assume it works by comparing the month attribute. So between(30/1, 30/3) == between(30/1, 1/3).
-
@bittersweet I skimmed the dokumentation now, provided by iiii, and it turns out i was wrong.
-
@bittersweet We could just make 13 months, each 28 days long, and have an extra day per year (and another in leap years) which wouldn't be counted in any timespan that happens to start before and end after them. Still broken but not as badly and people get to keep their time units.
-
@homo-lorens That still doesn't solve time on an interplanetary scale though.
An 1 Megasecond scrum sprint (~11 earth days) is just 1Ms on Earth, the Moon, Mars, etc. -
@bittersweet Yes, but I was more aiming for something that will satisfy the majority of humanity over the course of the next 100 years, not a solution for the unforeseeable future.
-
@bittersweet Actually I would support a decimal metric time system because I already rely on automatic alerts for 90% of my deadlines, but the vast majority of people try to memorize them in terms of how many times the sun will go down / it will get really cold / they don't have to work two days, and systems that don't align with the terran day-night cycle or year break this workflow.
-
iiii90854y@bittersweet whole month is a span that starts at day 1 of a month and spans to the end of the month (beit 28, 30 or 31 days)
-
@iiii The question is, do we accept the non-SI prefix myriasecond for 2.7 hours?
Related Rants
The feeling when java's plusMonths and monthsBetween are imcompatible 🤦
rant
java