From 7b30f744c4988f041f92686e7424ba06057fa36b Mon Sep 17 00:00:00 2001 From: Ajawu David Date: Fri, 9 Nov 2018 09:55:15 +0100 Subject: [PATCH] gigasecond classwork done --- src/main/scala/Gigasecond.scala | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/scala/Gigasecond.scala b/src/main/scala/Gigasecond.scala index 5edba80..2e908a4 100644 --- a/src/main/scala/Gigasecond.scala +++ b/src/main/scala/Gigasecond.scala @@ -1,6 +1,14 @@ +import java.time.LocalDate +import java.time.LocalDateTime object Gigasecond { - def add(startDate: LocalDate): LocalDateTime = ??? + def add(startDate: LocalDate): LocalDateTime = { + val gigasecondMoment = startDate.atStartOfDay().plusSeconds(1000000000) + gigasecondMoment + } - def add(startDateTime: LocalDateTime): LocalDateTime = ??? + def add(startDateTime: LocalDateTime): LocalDateTime = { + val gigasecondMoment = startDateTime.plusSeconds(1000000000) + gigasecondMoment + } }