Skip to content

equal ​

Checks whether two dates are equal by comparing their normalized timestamps.

Interactive example ​

Syntax ​

Classic signature ​

typescript
function equal(
	first: TheDate | SerializedTheDate,
	second: TheDate | SerializedTheDate
): boolean

Curried signature ​

typescript
function equal(
	second: TheDate | SerializedTheDate
): (first: TheDate | SerializedTheDate) => boolean

Parameters ​

  • first: First date value to compare.
  • second: Second date value used as reference.

Return value ​

true when both dates represent the same timestamp, otherwise false.

See also ​

Released under the MIT license.