浏览代码

LibJS: Remove unused code in DifferenceISODate

This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/056f695
Linus Groh 3 年之前
父节点
当前提交
356fa2dca1
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp

+ 0 - 4
Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp

@@ -225,10 +225,6 @@ DateDurationRecord difference_iso_date(GlobalObject& global_object, i32 year1, u
 
 
             // iii. Set mid to ! AddISODate(y1, m1, d1, years, months, 0, 0, "constrain").
             // iii. Set mid to ! AddISODate(y1, m1, d1, years, months, 0, 0, "constrain").
             mid = MUST(add_iso_date(global_object, year1, month1, day1, years, months, 0, 0, "constrain"sv));
             mid = MUST(add_iso_date(global_object, year1, month1, day1, years, months, 0, 0, "constrain"sv));
-
-            // FIXME: This is not used (spec issue, see https://github.com/tc39/proposal-temporal/issues/1483).
-            // iv. Set midSign to -(! CompareISODate(mid.[[Year]], mid.[[Month]], mid.[[Day]], y2, m2, d2)).
-            mid_sign = -compare_iso_date(mid.year, mid.month, mid.day, year2, month2, day2);
         }
         }
 
 
         // o. Let days be 0.
         // o. Let days be 0.