aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/date-fns/esm/isFriday/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/date-fns/esm/isFriday/index.js')
-rw-r--r--node_modules/date-fns/esm/isFriday/index.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/node_modules/date-fns/esm/isFriday/index.js b/node_modules/date-fns/esm/isFriday/index.js
new file mode 100644
index 0000000..38258f0
--- /dev/null
+++ b/node_modules/date-fns/esm/isFriday/index.js
@@ -0,0 +1,23 @@
+import toDate from "../toDate/index.js";
+import requiredArgs from "../_lib/requiredArgs/index.js";
+/**
+ * @name isFriday
+ * @category Weekday Helpers
+ * @summary Is the given date Friday?
+ *
+ * @description
+ * Is the given date Friday?
+ *
+ * @param {Date|Number} date - the date to check
+ * @returns {Boolean} the date is Friday
+ * @throws {TypeError} 1 argument required
+ *
+ * @example
+ * // Is 26 September 2014 Friday?
+ * const result = isFriday(new Date(2014, 8, 26))
+ * //=> true
+ */
+export default function isFriday(dirtyDate) {
+ requiredArgs(1, arguments);
+ return toDate(dirtyDate).getDay() === 5;
+} \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage