From 4e044dc0a0f44a20304fc2fc91facd6dad9c124b Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Tue, 28 May 2024 00:21:20 +0800 Subject: [PATCH] fix: typo (#3831) Signed-off-by: guoguangwu --- docs/d3-time.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: