DayByDay/Today/AppCalendar.swift
18 lines · 462 bytes
1//
2// AppCalendar.swift
3// DayByDay
4//
5
6import Foundation
7
8/// The calendar for every date the app shows or stores: Gregorian, weeks
9/// starting on Sunday, in the device's time zone, whatever calendar the
10/// device itself is set to.
11nonisolated enum AppCalendar {
12 static var current: Calendar {
13 var calendar = Calendar(identifier: .gregorian)
14 calendar.timeZone = .current
15 calendar.firstWeekday = 1
16 return calendar
17 }
18}