Skip to content

Commit

Permalink
Populate README
Browse files Browse the repository at this point in the history
  • Loading branch information
boswelja committed Apr 2, 2024
1 parent 951f41f commit d21134a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
# kotlin-datatypes

A collection of Kotlin Multiplatform libraries to represent complex data types.

## What's available?

[Capacity](./capacity) for reading from and converting to digital storage types, for example Megabytes to Gigabytes.

[Percentage](./percentage) for reading from and converting to the most common percentage formats, for example `1.0f` to `100`.

[Temperature](./temperature) for reading from and converting to Celsius, Fahrenheit, Kelvin, Rankine and Réaumur.

## Setup

Stay tuned for setup instructions.

## Platform support

All libraries currently support JVM and Android. There are no blockers for other platforms, we just
need to figure out publishing.

## Why?

I was tired of having to write functions that convert between units, like hours to seconds
(`5 / 60.0 / 60.0`). After a bit of looking around, I found out Kotlin had a built-in `Duration`
that could handle time conversions! `5.hours.inWholeSeconds` is much more readable.

After discovering `Duration`, I thought "well why not do the same for units of digital storage".
And then I got carried away, so here we are with a repository full of many different types.

0 comments on commit d21134a

Please sign in to comment.