Skip to content

Commit a8b8216

Browse files
committed
Improve some doc comments
1 parent 7065648 commit a8b8216

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

  • core/engine/src/builtins/intl/date_time_format

core/engine/src/builtins/intl/date_time_format/mod.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -820,10 +820,6 @@ pub(crate) fn create_date_time_format(
820820

821821
/// Formats a timestamp (epoch milliseconds) using the given [`DateTimeFormat`] internals.
822822
///
823-
/// This is the shared implementation used by:
824-
/// - the bound `format` function created in `get_format`, and
825-
/// - [`format_date_time_locale`] used by `Date.prototype.toLocaleString` (and friends).
826-
///
827823
/// It corresponds the `ToLocalTime` / `PartitionDateTimePattern` logic from
828824
/// [11.5.6](https://tc39.es/ecma402/#sec-partitiondatetimepattern) and
829825
/// [11.5.12](https://tc39.es/ecma402/#sec-tolocaltime).
@@ -938,22 +934,19 @@ fn best_fit_date_time_format(format_options: &FormatOptions) -> JsResult<Composi
938934
.map_err(|e| JsNativeError::range().with_message(e.to_string()).into())
939935
}
940936

941-
/// Represents the `required` and `defaults` arguments in the abstract operation
942-
/// `toDateTimeOptions`.
937+
/// Identifies a specific category of date-time components.
943938
#[derive(Debug, Clone, Copy, PartialEq)]
944939
pub(crate) enum FormatType {
945940
Date,
946941
Time,
947942
Any,
948943
}
949944

950-
/// Indicates which default fields should be applied when `ToDateTimeOptions`
951-
/// determines defaults are needed. `All` applies both date and time defaults.
945+
/// Identifies which default values to use when none are specified.
952946
#[derive(Debug, Clone, Copy, PartialEq)]
953947
pub(crate) enum FormatDefaults {
954948
Date,
955949
Time,
956-
/// Apply both date and time defaults (e.g. for `toLocaleString`).
957950
All,
958951
}
959952

0 commit comments

Comments
 (0)