registration
This commit is contained in:
25
frontend/style/node_modules/date-fns/isThisMonth.js
generated
vendored
25
frontend/style/node_modules/date-fns/isThisMonth.js
generated
vendored
@@ -1,7 +1,10 @@
|
||||
"use strict";
|
||||
exports.isThisMonth = isThisMonth;
|
||||
var _index = require("./constructNow.js");
|
||||
var _index2 = require("./isSameMonth.js");
|
||||
import { constructFrom } from "./constructFrom.js";
|
||||
import { constructNow } from "./constructNow.js";
|
||||
import { isSameMonth } from "./isSameMonth.js";
|
||||
|
||||
/**
|
||||
* The {@link isThisMonth} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name isThisMonth
|
||||
@@ -12,9 +15,8 @@ var _index2 = require("./isSameMonth.js");
|
||||
* @description
|
||||
* Is the given date in the same month as the current date?
|
||||
*
|
||||
* @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 in this month
|
||||
*
|
||||
@@ -23,7 +25,12 @@ var _index2 = require("./isSameMonth.js");
|
||||
* const result = isThisMonth(new Date(2014, 8, 15))
|
||||
* //=> true
|
||||
*/
|
||||
|
||||
function isThisMonth(date) {
|
||||
return (0, _index2.isSameMonth)(date, (0, _index.constructNow)(date));
|
||||
export function isThisMonth(date, options) {
|
||||
return isSameMonth(
|
||||
constructFrom(options?.in || date, date),
|
||||
constructNow(options?.in || date),
|
||||
);
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default isThisMonth;
|
||||
|
||||
Reference in New Issue
Block a user