holgerbrandl
10/27/2023, 11:53 AMCLOVIS
10/27/2023, 12:11 PMjw
10/27/2023, 12:19 PMholgerbrandl
10/27/2023, 12:34 PMholgerbrandl
10/27/2023, 12:35 PMholgerbrandl
10/27/2023, 12:36 PMinDays
is also deprecated 😕CLOVIS
10/27/2023, 12:37 PMinDays
: read its documentation 🙂holgerbrandl
10/27/2023, 12:37 PMtoDouble(DAYS)
is the new API. Not sure why it feels so much more complicated as inDays
CLOVIS
10/27/2023, 12:38 PMholgerbrandl
10/27/2023, 12:45 PMDmitry Khalanskiy [JB]
10/27/2023, 12:45 PMholgerbrandl
10/27/2023, 12:45 PM, errorSince = "1.8", hiddenSince = "1.9"
see https://github.com/JetBrains/kotlin/blob/7a7d392b3470b38d42f80c896b7270678d0f95c3/libraries/stdlib/src/kotlin/time/Duration.kt#L809Dmitry Khalanskiy [JB]
10/27/2023, 12:50 PMThread.sleep(inWholeMilliseconds)
),
• doing precise arithmetic operations on Duration values,
• etc.
This is why inWholeDays
is much more prominent than toDouble(DAYS)
.
What are you doing with Duration
values that needs floating-point numbers?holgerbrandl
10/27/2023, 12:58 PMorg.kalasim.TickTime
, to use kotlin.time.* instead. Generally this helps a lot to improve readability and type-safety. As part of the process, I deal a lot with fractional durations which are sometimes easier to use for me when expressing duration amounts. Since they did not do any harm and were part of stdib I was just curious why they had been removed. But clearly if nobody was using them, It's easy to bring them back in my library. I just wanted to double check that I did not miss anything before reimplementing the wheel.
Thanks everyone for your support in this thread.Dmitry Khalanskiy [JB]
10/27/2023, 1:18 PMDuration
, it turns out that something suddenly got significantly better or significantly worse, it would be great if you left some feedback.CLOVIS
10/27/2023, 1:18 PMDmitry Khalanskiy [JB]
10/27/2023, 1:23 PMholgerbrandl
10/27/2023, 1:44 PMdewildte
11/01/2023, 5:34 PMkevin.cianfarini
11/17/2023, 1:59 PM