Skip to content

Commit

Permalink
Merge pull request #40 from jacobras/release/1.8
Browse files Browse the repository at this point in the history
Release/1.8
  • Loading branch information
jacobras authored May 14, 2024
2 parents d86a8f8 + b4aeaca commit ac2ea4b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The library is published to Maven Central.

```kotlin
dependencies {
implementation("nl.jacobras:Human-Readable:1.7.0")
implementation("nl.jacobras:Human-Readable:1.8.0")
}
```

Expand Down Expand Up @@ -50,6 +50,16 @@ HumanReadable.fileSize(2_048, decimals = 1) // "2.0 kB"
HumanReadable.fileSize(21_947_282_882, decimals = 2) // "20.44 GB"
```

### 🔢 Number abbreviation

Available since version 1.8.

```kotlin
HumanReadable.abbreviation(3_000) // "3K"
HumanReadable.abbreviation(500_000) // "500K"
HumanReadable.abbreviation(2_500_000, decimals = 1) // "2.5M"
```

## Date/time precision
The formatter switches to a bigger unit (minute, hour, day, ...) as soon as it can.
For example:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "nl.jacobras"
version = "1.7.0"
version = "1.8.0"

mavenPublishing {
publishToMavenCentral(SonatypeHost.S01, true)
Expand Down

0 comments on commit ac2ea4b

Please sign in to comment.