REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.38 KB
Close
/home/byroehnu/easepay.easetack.com/node_modules/date-fns/differenceInCalendarMonths/index.js
Text
Base64
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = differenceInCalendarMonths; var _index = _interopRequireDefault(require("../toDate/index.js")); var _index2 = _interopRequireDefault(require("../_lib/requiredArgs/index.js")); /** * @name differenceInCalendarMonths * @category Month Helpers * @summary Get the number of calendar months between the given dates. * * @description * Get the number of calendar months between the given dates. * * @param {Date|Number} dateLeft - the later date * @param {Date|Number} dateRight - the earlier date * @returns {Number} the number of calendar months * @throws {TypeError} 2 arguments required * * @example * // How many calendar months are between 31 January 2014 and 1 September 2014? * const result = differenceInCalendarMonths( * new Date(2014, 8, 1), * new Date(2014, 0, 31) * ) * //=> 8 */ function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) { (0, _index2.default)(2, arguments); var dateLeft = (0, _index.default)(dirtyDateLeft); var dateRight = (0, _index.default)(dirtyDateRight); var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear(); var monthDiff = dateLeft.getMonth() - dateRight.getMonth(); return yearDiff * 12 + monthDiff; } module.exports = exports.default;
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.htaccess
127 B
lr--r--r--
2026-03-14 01:49:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.d.ts
193 B
lrw-r--r--
2026-02-28 00:36:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
1.38 KB
lrw-r--r--
2026-02-28 00:32:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js.flow
1.40 KB
lrw-r--r--
2026-02-28 00:28:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
116 B
lrw-r--r--
2026-02-28 00:34:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).