This repository has been archived on 2026-02-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

21 lines
380 B
Swift

import Elementary
import Foundation
public struct DateView: HTML, Sendable {
let date: Date
var formatter: DateFormatter {
let formatter = DateFormatter()
formatter.dateFormat = "MM/dd/yyyy"
return formatter
}
public init(_ date: Date) {
self.date = date
}
public var body: some HTML<HTMLTag.span> {
span { formatter.string(from: date) }
}
}