We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Almost equivalent to #484, but more pronounced.
From the documentation:
Returns the whole number of the specified date or time units between this and other instants in the specified timeZone.
This is not true: "the whole number" implies "the number rounded towards zero to the nearest whole number", but that's not what we get:
import kotlinx.datetime.* fun main() { val tz = TimeZone.of("Europe/Berlin") val i1 = LocalDateTime(2025, 3, 29, 2, 30).toInstant(tz) val i2 = LocalDateTime(2025, 3, 30, 3, 10).toInstant(tz) println(i2 - i1.plus(i1.until(i2, DateTimeUnit.DAY, tz), DateTimeUnit.DAY, tz)) // -20m }
b - (a + floor(b - a)) should be non-negative for positive b and a, but here, it's not.
b - (a + floor(b - a))
b
a
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Almost equivalent to #484, but more pronounced.
From the documentation:
This is not true: "the whole number" implies "the number rounded towards zero to the nearest whole number", but that's not what we get:
b - (a + floor(b - a))
should be non-negative for positiveb
anda
, but here, it's not.The text was updated successfully, but these errors were encountered: