Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erikc5000/island-time
A Kotlin Multiplatform library for working with dates and times
https://github.com/erikc5000/island-time
date kotlin kotlin-multiplatform kotlin-native time
Last synced: 6 days ago
JSON representation
A Kotlin Multiplatform library for working with dates and times
- Host: GitHub
- URL: https://github.com/erikc5000/island-time
- Owner: erikc5000
- License: apache-2.0
- Created: 2019-08-13T17:23:36.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T21:54:47.000Z (about 2 months ago)
- Last Synced: 2024-09-18T02:39:42.565Z (about 2 months ago)
- Topics: date, kotlin, kotlin-multiplatform, kotlin-native, time
- Language: Kotlin
- Homepage: https://islandtime.io
- Size: 4.14 MB
- Stars: 76
- Watchers: 1
- Forks: 6
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-kotlin-multiplatform - island-time - A Kotlin Multiplatform library for working with dates and times (Libraries / Utility)
- awesome-list - erikc5000/island-time - A Kotlin Multiplatform library for working with dates and times (Kotlin)
- kmp-awesome - Island Time - Date & Time library (Libraries / ⏰ Date-Time)
README
[![Build Status](https://github.com/erikc5000/island-time/actions/workflows/maven-publish.yaml/badge.svg?event=push)](https://github.com/erikc5000/island-time/actions/workflows/maven-publish.yaml?query=workflow%3APublish) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.islandtime/core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.islandtime/core)
# Island Time
A Kotlin Multiplatform library for working with dates and times, heavily inspired by the java.time library.
Features:
- A full set of date-time primitives such as `Date`, `Time`, `DateTime`, `Instant`, and `ZonedDateTime`
- Time zone database support
- Date ranges and time intervals, integrating with Kotlin ranges and progressions
- Read and write strings in ISO formats
- DSL-based definition of custom parsers
- Access localized text for names of months, days of the week, time zones, etc.
- Convenience operators like `date.next(MONDAY)`, `dateTime.startOfWeek`, or `date.week(WeekSettings.systemDefault())`
- Convert to and from platform-specific date-time types
- Works on JVM, Android, iOS, macOS, tvOS, and watchOSNotable Limitations:
- No custom format strings (must write platform-specific code to do this)
- No support for JavaScript or non-Apple native platforms
- Only supports the ISO calendar systemIsland Time is still early in development and "moving fast" so to speak. The API is likely to experience changes between minor version increments.
See the [project website](https://islandtime.io) for more information along with the API reference docs.
## Feedback/Contributions
The goal of this project is not just to port the java.time library over to Kotlin Multiplatform, but to take full advantage of Kotlin language features to create a date-time DSL that feels natural to users of the language and encourages best practices where possible. To that end, any and all feedback would be much appreciated in helping to iron out the API.
If you're interested in contributing or have ideas on areas that can be improved (there are definitely many right now), please feel free to initiate a dialog by opening design-related issues or submitting pull requests.