init commit - bring project over from Mood
This commit is contained in:
20
Shared/Random.swift
Normal file
20
Shared/Random.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Random.swift
|
||||
// Feels
|
||||
//
|
||||
// Created by Trey Tartt on 1/9/22.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class Random {
|
||||
static var widgetUpdateTime: Date {
|
||||
let components = DateComponents(hour: 0, minute: 30, second: 0)
|
||||
var updateTime = Date()
|
||||
if let tomorrow = Calendar.current.date(byAdding: .day, value: 1, to: Date()),
|
||||
let tomorrowMorning = Calendar.current.date(byAdding: components, to: tomorrow) {
|
||||
updateTime = tomorrowMorning
|
||||
}
|
||||
return updateTime
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user