registration
This commit is contained in:
17
frontend/style/node_modules/date-fns/addYears.js
generated
vendored
17
frontend/style/node_modules/date-fns/addYears.js
generated
vendored
@@ -1,6 +1,8 @@
|
||||
"use strict";
|
||||
exports.addYears = addYears;
|
||||
var _index = require("./addMonths.js");
|
||||
import { addMonths } from "./addMonths.js";
|
||||
|
||||
/**
|
||||
* The {@link addYears} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name addYears
|
||||
@@ -11,9 +13,11 @@ var _index = require("./addMonths.js");
|
||||
* Add the specified number of years to the given 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).
|
||||
* @typeParam ResultDate - The result `Date` type.
|
||||
*
|
||||
* @param date - The date to be changed
|
||||
* @param amount - The amount of years to be added.
|
||||
* @param options - The options
|
||||
*
|
||||
* @returns The new date with the years added
|
||||
*
|
||||
@@ -22,6 +26,9 @@ var _index = require("./addMonths.js");
|
||||
* const result = addYears(new Date(2014, 8, 1), 5)
|
||||
* //=> Sun Sep 01 2019 00:00:00
|
||||
*/
|
||||
function addYears(date, amount) {
|
||||
return (0, _index.addMonths)(date, amount * 12);
|
||||
export function addYears(date, amount, options) {
|
||||
return addMonths(date, amount * 12, options);
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default addYears;
|
||||
|
||||
Reference in New Issue
Block a user