diff --git a/docs/d3-time.md b/docs/d3-time.md index eca0692d..96fbaddf 100644 --- a/docs/d3-time.md +++ b/docs/d3-time.md @@ -44,7 +44,7 @@ d3.utcMonday.floor(new Date()) // the latest preceding Monday, UTC time [Source](https://github.com/d3/d3-time/blob/main/src/interval.js) ยท Returns a new date representing the latest interval boundary date before or equal to *date*. For example, [d3.timeDay](#timeDay).floor(*date*) typically returns 12:00 AM local time on the given *date*. -This method is idempotent: if the specified *date* is already floored to the current interval, a new date with an identical time is returned. Furthermore, the returned date is the minimum expressible value of the associated interval, such that *interval*.floor(*interval*.floor(*date*) - 1) returns the preceeding interval boundary date. +This method is idempotent: if the specified *date* is already floored to the current interval, a new date with an identical time is returned. Furthermore, the returned date is the minimum expressible value of the associated interval, such that *interval*.floor(*interval*.floor(*date*) - 1) returns the preceding interval boundary date. Note that the `==` and `===` operators do not compare by value with [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) objects, and thus you cannot use them to tell whether the specified *date* has already been floored. Instead, coerce to a number and then compare: