You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/plaindate.html
+18-5Lines changed: 18 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -694,21 +694,34 @@ <h1>
694
694
<h1>
695
695
ISODateSurpasses (
696
696
_sign_: -1 or 1,
697
-
_y1_: an integer,
698
-
_m1_: an integer,
699
-
_d1_: an integer,
697
+
_baseDate_: an ISO Date Record,
700
698
_isoDate2_: an ISO Date Record,
699
+
_years_: an integer,
700
+
_months_: an integer,
701
+
_weeks_: an integer,
702
+
_days_: an integer,
701
703
): a Boolean
702
704
</h1>
703
705
<dlclass="header">
704
706
<dt>description</dt>
705
707
<dd>
706
-
The return value indicates whether the date denoted by _y1_, _m1_, _d1_ surpasses that denoted by_isoDate2_ in the direction denoted by _sign_.
707
-
The former date does not have to exist.
708
+
The return value indicates whether the date _isoDate1_, the result of adding the duration denoted by _years_, _months_, _weeks_, and _days_ to _baseDate_, surpasses_isoDate2_ in the direction denoted by _sign_.
709
+
If _weeks_ and _days_ are both zero, then _isoDate1_ need not exist (for example, it could be February 30).
708
710
Note that this operation is specific to date difference calculations and is not the same as CompareISODate.
709
711
</dd>
710
712
</dl>
711
713
<emu-alg>
714
+
1. Let _yearMonth_ be BalanceISOYearMonth(_baseDate_.[[Year]] + _years_, _baseDate_.[[Month]] + _months_).
715
+
1. If _weeks_ is not 0 or _days_ is not 0, then
716
+
1. Let _regulatedDate_ be ! RegulateISODate(_yearMonth_.[[Year]], _yearMonth_.[[Month]], _baseDate_.[[Day]], ~constrain~).
717
+
1. Let _balancedDate_ be BalanceISODate(_regulatedDate_.[[Year]], _regulatedDate_.[[Month]], _regulatedDate_.[[Day]] + 7 * _weeks_ + _days_).
0 commit comments