Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/common/index.ts>Eq.dateEq

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Eq.dateEq
import { Eq } from "https://deno.land/x/rimbu@0.13.0/common/index.ts";
const { dateEq } = Eq;

Returns an Eq instance that compares Date objects according to their valueOf value.

Examples

Example 1

const eq = Eq.dateEq()
console.log(eq(new Date(2020, 1, 1), new Date(2020, 1, 1))
// => true
console.log(eq(new Date(2020, 1, 1), new Date(2020, 2, 1))
// => false