Silence some warnings. (#4969)

This commit is contained in:
Doug
2026-01-19 15:16:16 +00:00
committed by GitHub
parent a30ae24d16
commit 1faf9125c1
12 changed files with 50 additions and 55 deletions
+2 -3
View File
@@ -50,9 +50,8 @@ class DateTests: XCTestCase {
XCTAssertEqual(threeDaysAgo.formattedDateSeparator(), threeDaysAgo.formatted(.dateTime.weekday(.wide)))
// This test will fail during the first 6 days of the year.
let startOfTheYear = calendar.date(bySetting: .dayOfYear, value: 1, of: startOfToday)!
// FIXME: Uncomment on the 7th Jan.
// XCTAssertEqual(startOfTheYear.formattedDateSeparator(), startOfTheYear.formatted(.dateTime.weekday(.wide).day().month(.wide)))
let startOfTheYear = calendar.dateInterval(of: .year, for: startOfToday)!.start
XCTAssertEqual(startOfTheYear.formattedDateSeparator(), startOfTheYear.formatted(.dateTime.weekday(.wide).day().month(.wide)))
let theMillennium = calendar.date(from: DateComponents(year: 2000, month: 1, day: 1))!
XCTAssertEqual(theMillennium.formattedDateSeparator(), theMillennium.formatted(.dateTime.weekday(.wide).day().month(.wide).year()))