Skip to content

Commit

Permalink
ongoing
Browse files Browse the repository at this point in the history
  • Loading branch information
Reed Es committed Mar 13, 2023
1 parent 294799d commit 59baeee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/Entities/AppSetting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ public extension AppSetting {
get { StartOfDay(rawValue: Int(startOfDay)) ?? StartOfDay.defaultValue }
set { startOfDay = Int32(newValue.rawValue) }
}

var subjectiveToday: String? {
guard let sod = StartOfDay(rawValue: Int(startOfDay)),
let (consumedDay, _) = Date.now.getSubjectiveDate(dayStartHour: sod.hour,
dayStartMinute: sod.minute)
else { return nil }
return consumedDay
}
}

public extension AppSetting {
Expand Down

0 comments on commit 59baeee

Please sign in to comment.