An open API service indexing awesome lists of open source software.

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

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"))
}
```