registration
This commit is contained in:
15
frontend/style/node_modules/date-fns/isBefore.js
generated
vendored
15
frontend/style/node_modules/date-fns/isBefore.js
generated
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user