Date overview

Added in v2.0.0


Table of contents


constructors

create

Returns the current Date

Signature

export declare const create: IO<Date>

Added in v2.0.0

instances

Eq

Signature

export declare const Eq: E.Eq<Date>

Added in v2.10.0

Ord

Signature

export declare const Ord: O.Ord<Date>

Example

import { Ord } from 'fp-ts/Date'

assert.deepStrictEqual(Ord.compare(new Date(1, 1, 2020), new Date(1, 1, 2021)), -1)

Added in v2.10.0

eqDate

Signature

export declare const eqDate: E.Eq<Date>

Added in v2.6.0

eqMonth

Signature

export declare const eqMonth: E.Eq<Date>

Added in v2.6.0

eqYear

Signature

export declare const eqYear: E.Eq<Date>

Added in v2.6.0

utils

now

Returns the number of milliseconds elapsed since January 1, 1970, 00:00:00 UTC

Signature

export declare const now: IO<number>

Added in v2.0.0