Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
92 views

I have time in milliseconds where my time zone is already used (I am in UTC+3 zone) Let it be 1742747760000 and it is actually equal to 2025-03-23T16:36:00+03:00 I take my time in milliseconds, than ...
onesector's user avatar
  • 471
0 votes
1 answer
83 views

i have a timestamp in milliseconds (for example, 1710929100000) (Long). First i convert it to Instant selectedDateTimeMillis.toInstant() and get a output: 2025-03-20T12:45:00Z. Now, I need to format ...
onesector's user avatar
  • 471
0 votes
1 answer
1k views

I want to have a field in a data class that is type of java.time.LocalDate or kotlinx.datetime.LocalDateTime. This class will be consumed in a composable method. But in metric report this class is ...
beigirad's user avatar
  • 5,882
9 votes
2 answers
2k views

I use the kotlinx-datetime library to get and compare with the user's current date. I ran into a problem that: SomeInstant.toLocalDateTime(TimeZone.currentSystemDefault()).month.name Returns the name ...
Сергей Беляков's user avatar
3 votes
2 answers
5k views

I'm using kotlinx.Clock.now() to get current date. Next I need to convert this date to LocalDateTime, here is my code: Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault()) It works ...
testivanivan's user avatar
  • 1,544
1 vote
0 answers
698 views

I'm using Kotlinx.dateTime. And I need to get the current date and the current date - 12 months. Here is my code for current date: val currentDate: LocalDateTime = Clock.System.now() ....
testivanivan's user avatar
  • 1,544
4 votes
1 answer
5k views

I have two kotlinx.datetime.LocalDateTime instances: val startDate = LocalDateTime(year = 2020, month = Month.MARCH, dayOfMonth = 25, hour = 10, minute = 36, second = 12) val endDate = LocalDateTime(...
MohammadBaqer's user avatar
1 vote
0 answers
224 views

I am using LocalDateTime from kotlinx-datetime library. Want to insert List<LocalDateTime> in Room database. Typeconverter written using Gson library. But following error showing. java.lang....
ChandrimG's user avatar
  • 147
3 votes
2 answers
3k views

How can I get the dates of the current week using kotlinx.datetime KMM library? eg. I want to get a list of current week's date like: ("Monday, 07", "Tuesday, 08", "Wednesday, ...
Victor Kabata's user avatar
21 votes
3 answers
14k views

I'm converting some code from using Java 8's LocalDatetime to using the version from kotlinx-datetime and I can't find any formatting methods. Specifically, I'm replacing a FormatStyle.MEDIUM. Do they ...
Sean's user avatar
  • 3,158
5 votes
0 answers
2k views

I am new to Kotlin native and stumbled upon kotlinx-datetime. Before that i was using jodatime in my android application; More specifically i was using andoid.joda. I am wondering why these libraries ...
ciao0cacao0's user avatar