Skip to content

Commit b39983b

Browse files
committed
Merge v4.0.0 from AceTimeSuite
1 parent 272fff2 commit b39983b

File tree

144 files changed

+50470
-5109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+50470
-5109
lines changed

CHANGELOG.md

Lines changed: 69 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,53 @@
11
# Changelog
22

33
- unreleased
4+
- 4.0.0 (2025-10-21, TZDB version 2025b)
5+
- See [MIGRATING.md](MIGRATING.md) on breaking API changes, and how to
6+
migrate.
7+
- **Breaking** Rename LocalXxx to PlainXxx, following the conventions
8+
used by more modern timezone libraries (JavaScript Temporal, Python
9+
whenever).
10+
- LocalDate -> PlainDate
11+
- LocalDateTime -> PlainDateTime
12+
- LocalTime -> PlainTime
13+
- Backwards compatibility macros and methods have been added:
14+
- `#define LocalDate PlainDate`
15+
- `#define LocalDateTime PlainDateTime`
16+
- `#define LocalTime PlainTime`
17+
- **Breaking** Rename various methods with 'Local' to 'Plain':
18+
- `ZonedDateTime::localDateTime()` -> `plainDateTime()`
19+
- `ZonedDateTime::forLocalDateTime()` -> `forPlainDateTime()`
20+
- `ZonedExtra::forLocalDateTime()` -> `forPlainDateTime()`
21+
- `OffsetDateTime::localDateTime()` -> `plainDateTime()`
22+
- `OffsetDateTime::localDate()` -> `plainDate()`
23+
- `OffsetDateTime::localTime()` -> `plainTime()`
24+
- `PlainDateTime::localDate()` -> `plainDate()`
25+
- `PlainDateTime::localTime()` -> `plainTime()`
26+
- The old methods are retained for backwards compatibility, but are
27+
marked as deprecated.
28+
- **Breaking** Replace output parameter `fold` with `resolved`:
29+
- `ZonedDateTime::fold` becomes `ZonedDateTime::resolved`
30+
- `OffsetDateTime::fold` becomes `OffsetDateTime::resolved`
31+
- `PlainDateTime::fold` becomes `PlainDateTime::resolved`
32+
- `PlainTime::fold` becomes `PlainTime::resolved`
33+
- **Breaking** Replace input parameter `fold` with `disambiguate` in the
34+
following methods:
35+
- `ZonedDateTime::forComponents()`
36+
- `ZonedDateTime::forPlainDateTime()`
37+
- `ZonedDateTime::normalize()`
38+
- `ZonedExtra::forComponents()`
39+
- `ZonedExtra::forPlainDateTime()`
40+
- Add 2 more zonedb databases
41+
- `zonedb2025`
42+
- same as `zonedb`, but using transition rules for 2025 and onwards
43+
- used with `BasicZoneManager` and `BasicZoneProcessor
44+
- *larger* than `zonedb` because it supports more zones than
45+
`zonedb` (almost all zones in the TZDB, except maybe 7 zones)
46+
- zonedbx2025
47+
- same as zonedbx, but using transition rules for 2025 and onwards
48+
- used with `ExtendedZoneManager` and `ExtendedZoneProcessor
49+
- *smaller* than `zonedbx` (by around 10 kB) because it only
50+
includes transitions after 2025
451
- 3.0.0 (2025-04-25, TZDB version 2025b)
552
- [upgrade to TZDB 2025a](https://lists.iana.org/hyperkitty/list/[email protected]/thread/MWII7R3HMCEDNUCIYQKSSTYYR7UWK4OQ/)
653
- Paraguay adopts permanent -03 starting spring 2024.
@@ -9,15 +56,15 @@
956
- [upgrade to TZDB 2025b](https://lists.iana.org/hyperkitty/list/[email protected]/thread/6JVHNHLB6I2WAYTQ75L6KEPEQHFXAJK3/)
1057
- New zone for Aysén Region in Chile which moves from -04/-03 to -03.
1158
(Creates new zone named America/Coyhaique)
12-
- **breaking** add ZoneInfo data classes and their brokers into `Info`
59+
- **Breaking** Add ZoneInfo data classes and their brokers into `Info`
1360
container class
1461
- allows selection of parallel class hierarchies using the `Info`
1562
container class
1663
- `basic::ZoneInfo` class moves to `basic::Info::ZoneInfo`
1764
- `extended::ZoneInfo` class moves to `extended::Info::ZoneInfo`
1865
- `complete::ZoneInfo` class moves to `complete::Info::ZoneInfo`
19-
- **breaking** move `daysUntil(LocalDate, month, day)` to
20-
`LocalDate::daysUntil(month, day)` for simplicity
66+
- **Breaking** Move `daysUntil(PlainDate, month, day)` to
67+
`PlainDate::daysUntil(month, day)` for simplicity
2168
- See [Migrating to v3.0](MIGRATING.md#MigratingToVersion300) for more
2269
details.
2370
- 2.4.0 (2024-12-13, TZDB version 2024b)
@@ -105,7 +152,7 @@
105152
- Zone Processor with graceful degradation
106153
- Remove range checks against `ZoneContext.startYear()` and
107154
`ZoneContext.untilYear()`
108-
- Replace with `LocalDate::kMinYear` and `LocalDate::kMaxYear`, mostly
155+
- Replace with `PlainDate::kMinYear` and `PlainDate::kMaxYear`, mostly
109156
for formatting reasons (prevent negative
110157
years, and years with more than 4 digits).
111158
- The zone processors will always return something reasonble across the
@@ -224,7 +271,7 @@
224271
databases.
225272
- Add `ZonedDateTime::offsetDateTime()`
226273
- Returns the underlying `OffsetDateTime` inside the `ZonedDateTime`.
227-
- Analogous to `ZonedDateTime::localDateTime()`.
274+
- Analogous to `ZonedDateTime::plainDateTime()`.
228275
- Always generate anchor rules in zonedb.
229276
- Allows `ExtendedZoneProcessor` to work over all years `[0,10000)`
230277
even with truncated zonedb (e.g. `[2000,2100)`).
@@ -265,8 +312,8 @@
265312
- **New Class**: `ZonedExtra.h`
266313
- `ZonedExtra::forEpochSeconds(epochSeconds, tz)`
267314
- Create instance from epochSeconds and time zone.
268-
- `ZonedExtra::forLocalDateTime(ldt, tz)`
269-
- Create instance from LocalDateTime and time zone.
315+
- `ZonedExtra::forPlainDateTime(pdt, tz)`
316+
- Create instance from PlainDateTime and time zone.
270317
- **Potentially Breaking**: Unified Links
271318
- Links are now first-class citizens, exactly the same as Zones.
272319
- Unify "fat links" and "symbolic links" into a single implementation.
@@ -278,7 +325,7 @@
278325
- Simplify ZoneProcessors
279326
- `ZoneProcessor.h`, `ExtendedZoneProcessor.h`, `BasicZoneProcessor.h`
280327
- Remove: `getUtcOffset()`, `getDeltaOffset()`, `getAbbrev()`
281-
- Replaced by: `findByLocalDateTime()`, `findByEpochSeconds()`
328+
- Replaced by: `findByPlainDateTime()`, `findByEpochSeconds()`
282329
- These are internal helper methods not intended for public consumption.
283330
- Unit tests
284331
- Migrate most unit tests to use the smaller, testing zone databases at
@@ -308,15 +355,15 @@
308355
- Change internal storage type of `year` component from `int8_t` to
309356
`int16_t`, extending the range of valid years from [-1873,2127] to
310357
[1,9999].
311-
- Remove `yearTiny()` getters and setters from `LocalDate`,
312-
`LocalDateTime`, `OffsetDateTime`, and `ZonedDateTime`.
358+
- Remove `yearTiny()` getters and setters from `PlainDate`,
359+
`PlainDateTime`, `OffsetDateTime`, and `ZonedDateTime`.
313360
- They were not documented except in doxygen docs.
314-
- Remove from `LocalDate`:
361+
- Remove from `PlainDate`:
315362
- `kInvalidYearTiny`, replaced with `kInvalidYear`
316363
- `kMinYearTiny`, replaced with `kMinYear`
317364
- `kMaxYearTiny`, replaced with `kMaxYear`
318365
- `forTinyComponents()`
319-
- Remove from `LocalDateTime`
366+
- Remove from `PlainDateTime`
320367
- `forTinyComponents()`
321368
- Update [AceTimeTools](https://github.com/bxparks/AceTimeTools)
322369
to generate `src/zonedb` and `src/zonedbx` using `int16_t` year types.
@@ -334,7 +381,7 @@
334381
wikipedia article https://en.wikipedia.org/wiki/Julian_day.
335382
- `EpochConverterHinnant` implements the algorithms found in
336383
https://howardhinnant.github.io/date_algorithms.html.
337-
- Migrate `LocalDate` to use the `EpochConverterHinnant` instead of
384+
- Migrate `PlainDate` to use the `EpochConverterHinnant` instead of
338385
`EpochConverterJulian`.
339386
- The primary reason is that I am able to fully understand the
340387
algorithms described in `EpochConverterHinnant`.
@@ -413,7 +460,7 @@
413460
- ESP32 Core from 2.0.2 to 2.0.5
414461
- Teensyduino from 1.56 to 1.57
415462
- 1.11.4 (2022-08-13, TZDB 2022b)
416-
- Add `ace_time::daysUntil(localDate, month, day)` utility function that
463+
- Add `ace_time::daysUntil(plainDate, month, day)` utility function that
417464
returns the number of days until the next (month, day) date. Useful for
418465
calculating the number of days until the next Christmas for example.
419466
- Upgrade to TZDB 2022b.
@@ -501,17 +548,17 @@
501548
and overlaps.
502549
- The semantics of the `fold` parameter is intended to be identical to
503550
[Python PEP 495](https://www.python.org/dev/peps/pep-0495).
504-
- Add `LocalTime::fold()`, `LocalDateTime::fold()`,
551+
- Add `PlainTime::fold()`, `PlainDateTime::fold()`,
505552
`OffsetDateTime::fold()`, `ZonedDateTime::fold()`.
506553
- Update `ExtendedZoneProcessor::getOffsetDateTime(acetime_t)` to
507554
calculate the `OffsetDateTime::fold()` as an output parameter.
508555
- Update `ExtendedZoneProcessor::getOffsetDateTime(const
509-
LocalDateTime&)` to handle `LocalDateTime::fold()` as an input
556+
PlainDateTime&)` to handle `PlainDateTime::fold()` as an input
510557
parameter.
511558
- Increases flash usage of `ExtendedZoneProcessor` by around 600 bytes
512559
on AVR, and 400-600 bytes on 32-bit processors.
513560
- Add `toUnixSeconds64()` and `forUnixSeconds64()` methods to
514-
`LocalDate`, `LocalDateTime`, `OffsetDateTime`, `ZonedDateTime`.
561+
`PlainDate`, `PlainDateTime`, `OffsetDateTime`, `ZonedDateTime`.
515562
- These use 64-bit `int64_t` integers, which allows Unix seconds to be
516563
used up to 2068-01-19T03:14:07Z (which is the limit of these
517564
various classes due to the internal use of 32-bit `acetime_t`).
@@ -1009,12 +1056,12 @@
10091056
- Add documentation of `TimeZoneData`, `TimeZone::toTimeZoneData()`, and
10101057
`ZoneManager::createFromTimeZoneData()` to `USER_GUIDE.md`. Looks like I
10111058
added the class in v0.5 but forgot to document it.
1012-
- Implement `LocalDateTime::compareTo()` using only its components instead
1013-
of internally converting to epochSeconds. Not all `LocalDateTime` can be
1059+
- Implement `PlainDateTime::compareTo()` using only its components instead
1060+
of internally converting to epochSeconds. Not all `PlainDateTime` can be
10141061
represented by an epochSeconds, so this change makes the algorithm more
10151062
robust. The semantics of the method should remain unchanged.
1016-
- Update the doxygen docs of the `compareTo()` methods of `LocalDateTime`,
1017-
`LocalTime`, `LocalDate`, `OffsetDateTime` and `ZonedDateTime` to clarify
1063+
- Update the doxygen docs of the `compareTo()` methods of `PlainDateTime`,
1064+
`PlainTime`, `PlainDate`, `OffsetDateTime` and `ZonedDateTime` to clarify
10181065
the semantics of those operations.
10191066
- 1.2.1 (2020-11-12, TZ DB version 2020d)
10201067
- No functional change in this release. Mostly documentation.
@@ -1274,7 +1321,7 @@
12741321
- Change `ZonedDateTime::printTo()` format to match Java Time format.
12751322
- Remove `friend` declarations not related to unit tests.
12761323
- Remove redundant definitions of `kInvalidEpochSeconds`, standardize on
1277-
`LocalDate::kInvalidEpochSeconds`.
1324+
`PlainDate::kInvalidEpochSeconds`.
12781325
- Make `timeOffset` a required parameter for constructors and factory
12791326
methods `OffsetDateTime` instead of defaulting to `TimeOffset()`.
12801327
- Make `timeZone` a required parameter in constructors and factory methods

0 commit comments

Comments
 (0)