registration
This commit is contained in:
18
frontend/style/node_modules/date-fns/isFriday.js
generated
vendored
18
frontend/style/node_modules/date-fns/isFriday.js
generated
vendored
@@ -1,6 +1,8 @@
|
||||
"use strict";
|
||||
exports.isFriday = isFriday;
|
||||
var _index = require("./toDate.js");
|
||||
import { toDate } from "./toDate.js";
|
||||
|
||||
/**
|
||||
* The {@link isFriday} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name isFriday
|
||||
@@ -10,9 +12,8 @@ var _index = require("./toDate.js");
|
||||
* @description
|
||||
* Is the given date Friday?
|
||||
*
|
||||
* @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 Friday
|
||||
*
|
||||
@@ -21,6 +22,9 @@ var _index = require("./toDate.js");
|
||||
* const result = isFriday(new Date(2014, 8, 26))
|
||||
* //=> true
|
||||
*/
|
||||
function isFriday(date) {
|
||||
return (0, _index.toDate)(date).getDay() === 5;
|
||||
export function isFriday(date, options) {
|
||||
return toDate(date, options?.in).getDay() === 5;
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default isFriday;
|
||||
|
||||
Reference in New Issue
Block a user