PHP 8.2.30
Preview: index.js Size: 936 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/date-fns/getMonth/index.js

"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = getMonth;
var _index = _interopRequireDefault(require("../toDate/index.js"));
var _index2 = _interopRequireDefault(require("../_lib/requiredArgs/index.js"));
/**
 * @name getMonth
 * @category Month Helpers
 * @summary Get the month of the given date.
 *
 * @description
 * Get the month of the given date.
 *
 * @param {Date|Number} date - the given date
 * @returns {Number} the month
 * @throws {TypeError} 1 argument required
 *
 * @example
 * // Which month is 29 February 2012?
 * const result = getMonth(new Date(2012, 1, 29))
 * //=> 1
 */
function getMonth(dirtyDate) {
  (0, _index2.default)(1, arguments);
  var date = (0, _index.default)(dirtyDate);
  var month = date.getMonth();
  return month;
}
module.exports = exports.default;

Directory Contents

Dirs: 0 × Files: 4

Name Size Perms Modified Actions
157 B lrw-r--r-- 2026-02-28 00:36:48
Edit Download
936 B lrw-r--r-- 2026-02-28 00:33:48
Edit Download
1.36 KB lrw-r--r-- 2026-02-28 00:32:16
Edit Download
98 B lrw-r--r-- 2026-02-28 00:35:58
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).