Add milestone creation and editing

This commit is contained in:
Georg Bauer
2026-07-31 15:30:45 +02:00
parent da0a3aecb4
commit c4e64b5c0c
13 changed files with 591 additions and 21 deletions

View File

@@ -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)
}
}