summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-01-19 14:56:18 -0500
committerLinus Groh <mail@linusgroh.de>2022-01-19 21:20:41 +0000
commit6d3a3f279ab8449d2d46cdc24796a57014433497 (patch)
tree5993b94ae9600ff37595b33dfd0fe0751b1e5af0
parent4400150cd2d2142ecc747f7721ae217eb3ca1cbb (diff)
downloadserenity-6d3a3f279ab8449d2d46cdc24796a57014433497.zip
LibJS: Remove now unnecessary FIXME comments about LocalTime's [[InDST]]
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.h2
2 files changed, 1 insertions, 5 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp
index 852a055dfb..6b9eedc1c4 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp
@@ -937,7 +937,6 @@ ThrowCompletionOr<Vector<PatternPartition>> format_date_time_pattern(GlobalObjec
// iii. Let fv be a String value representing v in the form given by f; the String value depends upon the implementation and the effective locale of dateTimeFormat.
// The String value may also depend on the value of the [[InDST]] field of tm if f is "short", "long", "shortOffset", or "longOffset".
// If the implementation does not have a localized representation of f, then use the String value of v itself.
- // FIXME: This should take [[InDST]] into account.
auto formatted_value = Unicode::format_time_zone(data_locale, value, style, local_time.time_since_epoch());
// iv. Append a new Record { [[Type]]: p, [[Value]]: fv } as the last element of the list result.
@@ -1530,9 +1529,6 @@ ThrowCompletionOr<LocalTime> to_local_time(GlobalObject& global_object, double t
.second = sec_from_time(zoned_time),
// msFromTime(tz) specified in es2022's Hours, Minutes, Second, and Milliseconds.
.millisecond = ms_from_time(zoned_time),
- // Calculate true or false using the best available information about the specified calendar and timeZone, including current and historical information about time zone offsets from UTC and daylight saving time rules.
- // FIXME: Implement this.
- .in_dst = false,
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.h b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.h
index 518b6aebab..e27e406782 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.h
@@ -161,6 +161,7 @@ enum class OptionDefaults {
};
// Table 5: Record returned by ToLocalTime, https://tc39.es/ecma402/#table-datetimeformat-tolocaltime-record
+// Note: [[InDST]] is not included here - it is handled by LibUnicode / LibTimeZone.
struct LocalTime {
AK::Time time_since_epoch() const
{
@@ -178,7 +179,6 @@ struct LocalTime {
u8 minute { 0 }; // [[Minute]]
u8 second { 0 }; // [[Second]]
u16 millisecond { 0 }; // [[Millisecond]]
- bool in_dst { false }; // [[InDST]]
};
struct PatternPartitionWithSource : public PatternPartition {