https://github.com/alllex/minitime-parser
https://github.com/alllex/minitime-parser
date-time kotlin kotlin-coroutines kotlin-multiplatform parser
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/alllex/minitime-parser
- Owner: alllex
- Created: 2023-08-05T21:57:10.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-06T13:36:56.000Z (almost 2 years ago)
- Last Synced: 2025-02-08T20:47:36.201Z (4 months ago)
- Topics: date-time, kotlin, kotlin-coroutines, kotlin-multiplatform, parser
- Language: Kotlin
- Homepage:
- Size: 118 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mini date and time multiplatform parser
This is a Kotlin multiplatform library that uses [Parsus](https://github.com/alllex/parsus) framework to parse date and time strings.
It is intentionally very limited for educational purposes.Read a [blog post](https://blog.alllex.me/posts/2023-08-06-parsing-time-part-1/) about this project.
It supports only two date and time formats:
```kotlin
fun main() {
fun parse(s: String) = MiniDateTimeGrammar().parseOrThrow(s)
println(parse("09/01/2007 9:42 am"))
println(parse("2077-12-10 5:25"))
}
```