Skip to main content
Module

x/rimbu/mod.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.14.0/mod.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