Home Manual Reference Source

Function

Static Public Summary
public

decreasing(a: any, b: any): number

Compare two dates in decreasing order using the native comparison operators.

public

increasing(a: any, b: any): number

Compare two dates in increasing order using the native comparison operators.

Static Public

public decreasing(a: any, b: any): number source

import decreasing from '@total-order/date/src/decreasing.js'

Compare two dates in decreasing order using the native comparison operators.

Params:

NameTypeAttributeDescription
a any

The first parameter.

b any

The second parameter.

Return:

number

1 if a > b, 1 if a < b, and 0 otherwise.

public increasing(a: any, b: any): number source

import increasing from '@total-order/date/src/increasing.js'

Compare two dates in increasing order using the native comparison operators.

Params:

NameTypeAttributeDescription
a any

The first parameter.

b any

The second parameter.

Return:

number

1 if a < b, 1 if a > b, and 0 otherwise.