Add milestone creation and editing
This commit is contained in:
@@ -337,17 +337,4 @@ final class IssueEditorViewController: UIViewController, UITextFieldDelegate, UI
|
||||
|
||||
@objc private func cancel() { dismiss(animated: true) }
|
||||
|
||||
private func localDate(forUTCTimestamp timestamp: Int64) -> Date {
|
||||
var utc = Calendar(identifier: .gregorian)
|
||||
utc.timeZone = TimeZone(secondsFromGMT: 0)!
|
||||
let components = utc.dateComponents([.year, .month, .day], from: Date(timeIntervalSince1970: TimeInterval(timestamp)))
|
||||
return Calendar.current.date(from: components) ?? Date()
|
||||
}
|
||||
|
||||
private func utcTimestamp(forLocalDate date: Date) -> Int64 {
|
||||
let components = Calendar.current.dateComponents([.year, .month, .day], from: date)
|
||||
var utc = Calendar(identifier: .gregorian)
|
||||
utc.timeZone = TimeZone(secondsFromGMT: 0)!
|
||||
return Int64((utc.date(from: components) ?? date).timeIntervalSince1970)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user