Skip to content

Commit

Permalink
Merge pull request #154 from Abdul-Hameed-Turntabl/update-localdate
Browse files Browse the repository at this point in the history
Adding isWeekDay method to LocalDate module
  • Loading branch information
AttilaMihaly authored Dec 6, 2023
2 parents b330739 + fc496cb commit b328768
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions morphir/sdk/core/src/morphir/sdk/LocalDate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ object LocalDate {
def diffInYears(fromDate: LocalDate)(toDate: LocalDate): Int =
(YEARS between (fromDate, toDate)).toInt

def isWeekDay(date: LocalDate): Bool =
date.getDayOfWeek.getValue < 6

/** Provides a conversion from a `java.time.LocalDate` to a `morphir.sdk.LocalDate.LocalDate`
*/
implicit def fromJavaTimeLocalDate(
Expand Down

0 comments on commit b328768

Please sign in to comment.