amtkstat/Sources/AmtrakStatus/Helper.swift
Tony Bark 79176585b4 Improve train status formatting
This change adds proper singular/plural labels for minutes and hours in the lateness display, fixes green status text contrast for dark mode, and updates the README to credit the Amtrak.js models used as a base.
2026-08-24 20:07:11 -04:00

7 lines
147 B
Swift

import Foundation
extension Int {
func pluralized(singular: String, plural: String) -> String {
self == 1 ? singular : plural
}
}