Commit 32f92b1
committed
Intl.DateTimeFormat: support Temporal types in format/formatRange
- Add IntlDateTimeInput enum to dispatch Legacy, Instant, and Plain Temporal inputs
- Add IntlTemporalDateTimeKind and IntlTemporalDateTimeFields structs for Temporal field representation
- Add intl_temporal_fields_from_{date,datetime,time,year_month,month_day} converters
- Add intl_date_time_format_input / intl_date_time_format_required_input dispatchers
- Add intl_temporal_normalized_formatter, intl_temporal_instant_formatter helpers
- Add intl_date_time_format_parts_for_temporal and intl_temporal_style_parts for Temporal-aware rendering
- Add intl_date_time_range_parts_from_values and intl_can_collapse_date_time_range_prefix for range formatting
- Update format/formatToParts/formatRange/formatRangeToParts to handle all Temporal types
- Add kind-mismatch check in formatRange for mixed Temporal/non-Temporal arguments
- Expose temporal_expect_{instant,plain_date,plain_date_time,plain_time,year_month,month_day} as pub(super)
- Add temporal_value_kind helper to identify Temporal object kind
- Wire all Temporal toLocaleString methods to Intl.DateTimeFormat with locale/options args
- Add temporal_instant_to_locale_string and temporal_duration_to_locale_string helpers
- Fix date.rs needs_defaults to account for dateStyle/timeStyle options1 parent 1d4aae3 commit 32f92b1
4 files changed
Lines changed: 1274 additions & 86 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
277 | 279 | | |
278 | 280 | | |
279 | 281 | | |
| 282 | + | |
| 283 | + | |
280 | 284 | | |
281 | | - | |
282 | | - | |
283 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
| |||
0 commit comments