aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/date-fns/esm/setSeconds
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/date-fns/esm/setSeconds')
-rw-r--r--node_modules/date-fns/esm/setSeconds/index.d.ts4
-rw-r--r--node_modules/date-fns/esm/setSeconds/index.js28
-rw-r--r--node_modules/date-fns/esm/setSeconds/index.js.flow52
-rw-r--r--node_modules/date-fns/esm/setSeconds/package.json4
4 files changed, 88 insertions, 0 deletions
diff --git a/node_modules/date-fns/esm/setSeconds/index.d.ts b/node_modules/date-fns/esm/setSeconds/index.d.ts
new file mode 100644
index 0000000..a67a07f
--- /dev/null
+++ b/node_modules/date-fns/esm/setSeconds/index.d.ts
@@ -0,0 +1,4 @@
+// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
+
+import { setSeconds } from 'date-fns'
+export default setSeconds
diff --git a/node_modules/date-fns/esm/setSeconds/index.js b/node_modules/date-fns/esm/setSeconds/index.js
new file mode 100644
index 0000000..8e5ae67
--- /dev/null
+++ b/node_modules/date-fns/esm/setSeconds/index.js
@@ -0,0 +1,28 @@
+import toInteger from "../_lib/toInteger/index.js";
+import toDate from "../toDate/index.js";
+import requiredArgs from "../_lib/requiredArgs/index.js";
+/**
+ * @name setSeconds
+ * @category Second Helpers
+ * @summary Set the seconds to the given date.
+ *
+ * @description
+ * Set the seconds to the given date.
+ *
+ * @param {Date|Number} date - the date to be changed
+ * @param {Number} seconds - the seconds of the new date
+ * @returns {Date} the new date with the seconds set
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // Set 45 seconds to 1 September 2014 11:30:40:
+ * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)
+ * //=> Mon Sep 01 2014 11:30:45
+ */
+export default function setSeconds(dirtyDate, dirtySeconds) {
+ requiredArgs(2, arguments);
+ var date = toDate(dirtyDate);
+ var seconds = toInteger(dirtySeconds);
+ date.setSeconds(seconds);
+ return date;
+} \ No newline at end of file
diff --git a/node_modules/date-fns/esm/setSeconds/index.js.flow b/node_modules/date-fns/esm/setSeconds/index.js.flow
new file mode 100644
index 0000000..056c068
--- /dev/null
+++ b/node_modules/date-fns/esm/setSeconds/index.js.flow
@@ -0,0 +1,52 @@
+// @flow
+// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
+
+export type Interval = {
+ start: Date | number,
+ end: Date | number,
+}
+
+export type Locale = {
+ code?: string,
+ formatDistance?: (...args: Array<any>) => any,
+ formatRelative?: (...args: Array<any>) => any,
+ localize?: {
+ ordinalNumber: (...args: Array<any>) => any,
+ era: (...args: Array<any>) => any,
+ quarter: (...args: Array<any>) => any,
+ month: (...args: Array<any>) => any,
+ day: (...args: Array<any>) => any,
+ dayPeriod: (...args: Array<any>) => any,
+ },
+ formatLong?: {
+ date: (...args: Array<any>) => any,
+ time: (...args: Array<any>) => any,
+ dateTime: (...args: Array<any>) => any,
+ },
+ match?: {
+ ordinalNumber: (...args: Array<any>) => any,
+ era: (...args: Array<any>) => any,
+ quarter: (...args: Array<any>) => any,
+ month: (...args: Array<any>) => any,
+ day: (...args: Array<any>) => any,
+ dayPeriod: (...args: Array<any>) => any,
+ },
+ options?: {
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
+ firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
+ },
+}
+
+export type Duration = {
+ years?: number,
+ months?: number,
+ weeks?: number,
+ days?: number,
+ hours?: number,
+ minutes?: number,
+ seconds?: number,
+}
+
+export type Day = 0 | 1 | 2 | 3 | 4 | 5 | 6
+
+declare module.exports: (date: Date | number, seconds: number) => Date
diff --git a/node_modules/date-fns/esm/setSeconds/package.json b/node_modules/date-fns/esm/setSeconds/package.json
new file mode 100644
index 0000000..b109f05
--- /dev/null
+++ b/node_modules/date-fns/esm/setSeconds/package.json
@@ -0,0 +1,4 @@
+{
+ "sideEffects": false,
+ "typings": "../../typings.d.ts"
+} \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage