Truncate recurring transaction times to seconds
Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
parent
1fa28fb2e1
commit
13c4096fe8
1 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@ package com.wbrawner.twigs
|
|||
|
||||
import com.wbrawner.twigs.model.RecurringTransaction
|
||||
import kotlinx.serialization.Serializable
|
||||
import java.time.temporal.ChronoUnit
|
||||
|
||||
@Serializable
|
||||
data class RecurringTransactionRequest(
|
||||
|
@ -36,8 +37,8 @@ fun RecurringTransaction.asResponse(): RecurringTransactionResponse = RecurringT
|
|||
title = title,
|
||||
description = description,
|
||||
frequency = frequency.toString(),
|
||||
start = start.toString(),
|
||||
finish = finish?.toString(),
|
||||
start = start.truncatedTo(ChronoUnit.SECONDS).toString(),
|
||||
finish = finish?.truncatedTo(ChronoUnit.SECONDS)?.toString(),
|
||||
amount = amount,
|
||||
expense = expense,
|
||||
budgetId = budgetId,
|
||||
|
|
Loading…
Reference in a new issue