registration

This commit is contained in:
User
2025-02-02 16:08:03 +03:00
parent 7f6495eb4d
commit 78afbaed71
6334 changed files with 196774 additions and 165754 deletions

View File

@@ -1,6 +1,4 @@
"use strict";
exports.isBefore = isBefore;
var _index = require("./toDate.js");
import { toDate } from "./toDate.js";
/**
* @name isBefore
@@ -10,8 +8,6 @@ var _index = require("./toDate.js");
* @description
* Is the first date before the second one?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date that should be before the other one to return true
* @param dateToCompare - The date to compare with
*
@@ -22,8 +18,9 @@ var _index = require("./toDate.js");
* const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
* //=> false
*/
function isBefore(date, dateToCompare) {
const _date = (0, _index.toDate)(date);
const _dateToCompare = (0, _index.toDate)(dateToCompare);
return +_date < +_dateToCompare;
export function isBefore(date, dateToCompare) {
return +toDate(date) < +toDate(dateToCompare);
}
// Fallback for modularized imports:
export default isBefore;