5 Commits

Author SHA1 Message Date
Tony Parker
63cfcb9bfd
ISO8601 DateComponents format style (#1209)
* ISO8601 DateComponents style

* Add Hashable to ISO8601FormatStyle
2025-04-04 13:58:57 -07:00
Jeremy Schonfeld
e5211f2926
(122981400) Standardize on using internal import 2024-03-06 13:42:02 -08:00
Tony Parker
15159ccc4a
Calendar Sequence API (#322)
* Calendar Sequence API

* Add Calendar_Gregorian support and placeholders for dayOfYear

* Address review feedback and fix test failure

* Disable day of year for in-progress Gregorian calendar implementation

* Adjust the Calendar_Gregorian use of dayOfYear pending some more work there

* Remove if available FoundationPreview 0.4 checks (see #384)
2024-01-17 16:43:16 -08:00
Tina Liu
4387ce0f10
[WIP Gregorian Calendar] Implement date(byAdding components: DateComponents, to date: Date, wrappingComponents: Bool) (#317)
* WIP: Implement `date(byAdding components: DateComponents, to date: Date, wrappingComponents: Bool)`

This largely follows ICU's calendar::add and calendar::roll.

* It takes around a minute to run these compatibility tests as of this moment. I expect it to take even longer as we add more tests to it. Disable them on CI for now. The appropriate tests should assert their expected absolute values respectively.

* Add a convenience initializer to Date.Components and use it in tests
2023-12-02 07:30:45 -08:00
Tony Parker
d942713680
Sink TimeZone, Locale, Calendar to Essentials (#266)
* Sink Locale, Calendar to Essentials

* Add a Calendar test, make sure that _lock is populated early for NSSwiftCalendar
2023-09-25 16:09:16 -07:00