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,8 +1,10 @@
"use strict";
exports.isTomorrow = isTomorrow;
var _index = require("./addDays.js");
var _index2 = require("./constructNow.js");
var _index3 = require("./isSameDay.js");
import { addDays } from "./addDays.js";
import { constructNow } from "./constructNow.js";
import { isSameDay } from "./isSameDay.js";
/**
* The {@link isTomorrow} function options.
*/
/**
* @name isTomorrow
@@ -13,9 +15,8 @@ var _index3 = require("./isSameDay.js");
* @description
* Is the given date tomorrow?
*
* @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 to check
* @param options - An object with options
*
* @returns The date is tomorrow
*
@@ -24,9 +25,13 @@ var _index3 = require("./isSameDay.js");
* const result = isTomorrow(new Date(2014, 9, 7, 14, 0))
* //=> true
*/
function isTomorrow(date) {
return (0, _index3.isSameDay)(
export function isTomorrow(date, options) {
return isSameDay(
date,
(0, _index.addDays)((0, _index2.constructNow)(date), 1),
addDays(constructNow(options?.in || date), 1),
options,
);
}
// Fallback for modularized imports:
export default isTomorrow;