@@ -138,6 +138,7 @@ macro_rules! impl_marker_with_options {
138
138
/// Internal helper macro used by [`impl_date_marker`] and [`impl_calendar_period_marker`]
139
139
macro_rules! impl_date_or_calendar_period_marker {
140
140
(
141
+ $( #[ $attr: meta] ) *
141
142
// The name of the type being created.
142
143
$type: ident,
143
144
// A plain language description of the field set for documentation.
@@ -218,6 +219,7 @@ macro_rules! impl_date_or_calendar_period_marker {
218
219
#[ doc = concat!( " \" " , $sample, "\" " ) ]
219
220
/// );
220
221
/// ```
222
+ $( #[ $attr] ) *
221
223
$type,
222
224
sample_length: $sample_length,
223
225
$( alignment: $option_alignment_yes, ) ?
@@ -278,6 +280,7 @@ macro_rules! impl_date_or_calendar_period_marker {
278
280
/// See [`impl_date_marker`].
279
281
macro_rules! impl_date_marker {
280
282
(
283
+ $( #[ $attr: meta] ) *
281
284
$type: ident,
282
285
$components: expr,
283
286
description = $description: literal,
@@ -296,6 +299,7 @@ macro_rules! impl_date_marker {
296
299
$( option_alignment = $option_alignment_yes: ident, ) ?
297
300
) => {
298
301
impl_date_or_calendar_period_marker!(
302
+ $( #[ $attr] ) *
299
303
$type,
300
304
description = $description,
301
305
sample_length = $sample_length,
@@ -330,6 +334,7 @@ macro_rules! impl_date_marker {
330
334
/// See [`impl_date_marker`].
331
335
macro_rules! impl_calendar_period_marker {
332
336
(
337
+ $( #[ $attr: meta] ) *
333
338
$type: ident,
334
339
$components: expr,
335
340
description = $description: literal,
@@ -344,6 +349,7 @@ macro_rules! impl_calendar_period_marker {
344
349
$( option_alignment = $option_alignment_yes: ident, ) ?
345
350
) => {
346
351
impl_date_or_calendar_period_marker!(
352
+ $( #[ $attr] ) *
347
353
$type,
348
354
description = $description,
349
355
sample_length = $sample_length,
@@ -371,6 +377,7 @@ macro_rules! impl_calendar_period_marker {
371
377
/// Documentation for each option is shown inline below.
372
378
macro_rules! impl_time_marker {
373
379
(
380
+ $( #[ $attr: meta] ) *
374
381
// The name of the type being created.
375
382
$type: ident,
376
383
// An expression for the field set.
@@ -443,6 +450,7 @@ macro_rules! impl_time_marker {
443
450
#[ doc = concat!( " \" " , $sample, "\" " ) ]
444
451
/// );
445
452
/// ```
453
+ $( #[ $attr] ) *
446
454
$type,
447
455
sample_length: $sample_length,
448
456
alignment: yes,
@@ -783,11 +791,13 @@ macro_rules! impl_zoneddatetime_marker {
783
791
}
784
792
785
793
impl_date_marker ! (
794
+ /// This format may use ordinal formatting, such as "the 17th",
795
+ /// in the future. See CLDR-18040.
786
796
D ,
787
797
NeoDateComponents :: Day ,
788
798
description = "day of month (standalone)" ,
789
799
sample_length = Short ,
790
- sample = "the 17th " ,
800
+ sample = "17 " ,
791
801
input_day_of_month = yes,
792
802
input_any_calendar_kind = yes,
793
803
option_alignment = yes,
@@ -804,11 +814,13 @@ impl_date_marker!(
804
814
) ;
805
815
806
816
impl_date_marker ! (
817
+ /// This format may use ordinal formatting, such as "Friday the 17th",
818
+ /// in the future. See CLDR-18040.
807
819
DE ,
808
820
NeoDateComponents :: DayWeekday ,
809
821
description = "day of month and weekday" ,
810
822
sample_length = Long ,
811
- sample = "Friday the 17th " ,
823
+ sample = "17 Friday " ,
812
824
weekdays = yes,
813
825
input_day_of_month = yes,
814
826
input_day_of_week = yes,
@@ -829,11 +841,12 @@ impl_date_marker!(
829
841
) ;
830
842
831
843
impl_date_marker ! (
844
+ /// See CLDR-18040 for progress on improving this format.
832
845
MDE ,
833
846
NeoDateComponents :: MonthDayWeekday ,
834
847
description = "month, day, and weekday" ,
835
848
sample_length = Medium ,
836
- sample = "Friday , May 17" ,
849
+ sample = "Fri , May 17" ,
837
850
months = yes,
838
851
weekdays = yes,
839
852
input_month = yes,
@@ -1041,8 +1054,8 @@ impl_zone_marker!(
1041
1054
/// use icu::timezone::{TimeZoneInfo, CustomZonedDateTime};
1042
1055
/// use icu::calendar::Gregorian;
1043
1056
/// use icu::datetime::DateTimeFormatter;
1044
- /// use icu::datetime::fieldset::NeoMonthDayMarker ;
1045
- /// use icu::datetime::fieldset::NeoHourMinuteMarker ;
1057
+ /// use icu::datetime::fieldset::MD ;
1058
+ /// use icu::datetime::fieldset::HM ;
1046
1059
/// use icu::datetime::fieldset::NeoTimeZoneSpecificShortMarker;
1047
1060
/// use icu::datetime::DateTimeCombo;
1048
1061
/// use icu::datetime::neo_skeleton::NeoSkeletonLength;
@@ -1051,8 +1064,8 @@ impl_zone_marker!(
1051
1064
/// use writeable::assert_try_writeable_eq;
1052
1065
///
1053
1066
/// type MyDateTimeZoneSet = DateTimeCombo<
1054
- /// NeoMonthDayMarker ,
1055
- /// NeoHourMinuteMarker ,
1067
+ /// MD ,
1068
+ /// HM ,
1056
1069
/// NeoTimeZoneSpecificShortMarker,
1057
1070
/// >;
1058
1071
///
@@ -1313,8 +1326,8 @@ impl_zone_marker!(
1313
1326
/// use icu::timezone::{TimeZoneInfo, CustomZonedDateTime};
1314
1327
/// use icu::calendar::Gregorian;
1315
1328
/// use icu::datetime::DateTimeFormatter;
1316
- /// use icu::datetime::fieldset::NeoMonthDayMarker ;
1317
- /// use icu::datetime::fieldset::NeoHourMinuteMarker ;
1329
+ /// use icu::datetime::fieldset::MD ;
1330
+ /// use icu::datetime::fieldset::HM ;
1318
1331
/// use icu::datetime::fieldset::NeoTimeZoneGenericShortMarker;
1319
1332
/// use icu::datetime::DateTimeCombo;
1320
1333
/// use icu::datetime::neo_skeleton::NeoSkeletonLength;
@@ -1323,8 +1336,8 @@ impl_zone_marker!(
1323
1336
/// use writeable::assert_try_writeable_eq;
1324
1337
///
1325
1338
/// type MyDateTimeZoneSet = DateTimeCombo<
1326
- /// NeoMonthDayMarker ,
1327
- /// NeoHourMinuteMarker ,
1339
+ /// MD ,
1340
+ /// HM ,
1328
1341
/// NeoTimeZoneGenericShortMarker,
1329
1342
/// >;
1330
1343
///
0 commit comments