krz/daybyday

iOS learning games for young children: days, months, seasons, numbers, letters, animals and more. education ios kids swift https://krz.sh/apps/daybyday/

DayByDay/Today/AppCalendar.swift

062549ad26607ce9e973ed2a9a7ef6f853885f83
daybyday/DayByDay/Today/AppCalendar.swift history · blame · raw

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}