registration
This commit is contained in:
20
frontend/style/node_modules/date-fns/getMonth.js
generated
vendored
20
frontend/style/node_modules/date-fns/getMonth.js
generated
vendored
@@ -1,6 +1,8 @@
|
||||
"use strict";
|
||||
exports.getMonth = getMonth;
|
||||
var _index = require("./toDate.js");
|
||||
import { toDate } from "./toDate.js";
|
||||
|
||||
/**
|
||||
* The {@link getMonth} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name getMonth
|
||||
@@ -10,9 +12,8 @@ var _index = require("./toDate.js");
|
||||
* @description
|
||||
* Get the month of 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).
|
||||
*
|
||||
* @param date - The given date
|
||||
* @param options - An object with options
|
||||
*
|
||||
* @returns The month index (0-11)
|
||||
*
|
||||
@@ -21,8 +22,9 @@ var _index = require("./toDate.js");
|
||||
* const result = getMonth(new Date(2012, 1, 29))
|
||||
* //=> 1
|
||||
*/
|
||||
function getMonth(date) {
|
||||
const _date = (0, _index.toDate)(date);
|
||||
const month = _date.getMonth();
|
||||
return month;
|
||||
export function getMonth(date, options) {
|
||||
return toDate(date, options?.in).getMonth();
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default getMonth;
|
||||
|
||||
Reference in New Issue
Block a user