8f8f8b2755
macOS menu bar app providing NHL game situational awareness with league-wide scoreboard, dynamic polling, notifications with team logos, and configurable display options.
22 lines
491 B
Swift
22 lines
491 B
Swift
//
|
|
// Date+formatDateET.swift
|
|
// IceGlass
|
|
//
|
|
// Copyright 2026 Rouslan Zenetl. All Rights Reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension Date {
|
|
func formatDateET(format: String = "MMMM, d yyyy @ h:mm a z") -> String {
|
|
let formatter = DateFormatter()
|
|
formatter.timeZone = TimeZone(identifier: "America/New_York")
|
|
formatter.dateFormat = format
|
|
return formatter.string(from: self)
|
|
}
|
|
|
|
static var ISO8601: String {
|
|
"yyyy-MM-dd'T'HH:mm:ssZ"
|
|
}
|
|
}
|