Skip to content

Commit

Permalink
Started using
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jan 23, 2025
1 parent aba9abf commit f5868f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/aviation.Timespan.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object Timespan:
def milliseconds(period: Timespan & FixedDuration): Long =
period.hours*3600000L + period.minutes*60000L + period.seconds*1000L

def apply(denomination: StandardTime, n: Int): Timespan = (denomination: @unchecked) match
def apply(denomination: StandardTime, n: Int): Timespan = denomination.runtimeChecked match
case StandardTime.Year => Timespan(n, 0, 0, 0, 0, 0)
case StandardTime.Month => Timespan(0, n, 0, 0, 0, 0)
case StandardTime.Day => Timespan(0, 0, n, 0, 0, 0)
Expand Down
2 changes: 1 addition & 1 deletion src/core/aviation.Timing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ object Timing:
infix def in (using RomanCalendar)(timezone: Timezone): LocalTime =
val zonedTime = jt.Instant.ofEpochMilli(instant).nn.atZone(jt.ZoneId.of(timezone.name.s)).nn

val date = (zonedTime.getMonthValue: @unchecked) match
val date = zonedTime.getMonthValue.runtimeChecked match
case MonthName(month) => unsafely(Date(zonedTime.getYear, month, zonedTime.getDayOfMonth))

val time = ((zonedTime.getHour, zonedTime.getMinute, zonedTime.getSecond): @unchecked) match
Expand Down

0 comments on commit f5868f2

Please sign in to comment.