Skip to content

Commit 5faffb6

Browse files
committed
fixed minor problem with cats2 output format
1 parent 175abdc commit 5faffb6

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ that is fed by your [Timeular](https://timeular.com) device.
77

88
either set the `TIMEULAR_API_KEY` and `TIMEULAR_API_SECRET` environment variables, or supply `--api-key` or `--api-secret` cli params.
99

10-
Full usage instructions:
10+
Full usage instructions (get them by calling the application without any parameters):
1111

1212
```
1313
Usage: timeular-cli [start|stop|list-activities|export] [options] <args>...

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name := """timeular-cli"""
22

3-
version := "0.2-SNAPSHOT"
3+
version := "0.2"
44

55
scalaVersion := "2.13.1"
66

src/main/scala/de/lenabrueder/timeular/report/SAPGuiExcelReport.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package de.lenabrueder.timeular.report
33
import java.io.ByteArrayOutputStream
44
import java.time.DayOfWeek
55
import java.time.LocalTime
6+
import java.util.Locale
67

78
import com.typesafe.scalalogging.StrictLogging
89
import de.lenabrueder.timeular.api.TimeEntry
@@ -31,9 +32,10 @@ class SAPGuiExcelReport(val filters: Filters) extends Report[Array[Byte]] with S
3132

3233
val days = DayOfWeek.values().toSeq.map(_.toString)
3334
def formatDuration(d: Duration): String = {
34-
val hours = d.toHours
35-
val minutes = (d - hours.hours).toMinutes
36-
f"$hours:$minutes%02d"
35+
val hours = d.toHours
36+
val minutes = (d - hours.hours).toMinutes
37+
val hourWithMinutesFraction = hours.toDouble + minutes / 60.0
38+
"%.2f".formatLocal(Locale.GERMANY, hourWithMinutesFraction)
3739
}
3840

3941
def create(entries: Seq[TimeEntry]) = {

0 commit comments

Comments
 (0)