UEA-PRODEM
This commit is contained in:
+52
-13
@@ -8,6 +8,58 @@ This change log follows the format documented in [Keep a CHANGELOG].
|
||||
[semantic versioning]: http://semver.org/
|
||||
[keep a changelog]: http://keepachangelog.com/
|
||||
|
||||
## v5.0.0-alpha.0 - 2026-05-30
|
||||
|
||||
### Changed
|
||||
|
||||
- **BREAKING**: The CDN scripts are now available via the `@date-fns/cdn` npm package instead of `date-fns`. Users relying on the latest CDN version (e.g., `https://cdn.jsdelivr.net/npm/date-fns/cdn.min.js`) would be served a polyfill that inserts a script with the correct URL (`https://cdn.jsdelivr.net/npm/@date-fns/cdn/cdn.min.js`) into the page.
|
||||
|
||||
## v4.4.0 - 2026-05-30
|
||||
|
||||
This release revisits the approach to CDN usage and introduces a new package, `@date-fns/cdn` and deprecates the `date-fns` CDN scripts. It allowed reducing the zipped package size from `5.83 MB` down to `3.96 MB` without introducing any breaking changes.
|
||||
|
||||
In `v5.0.0-alpha.0` where CDN scripts are completely removed from `date-fns` the change is more significant and brings the zipped package size down to `2.89 MB`.
|
||||
|
||||
It is just the first step in optimizing the package size. Expect further size reduction in the future v4 and v5 versions.
|
||||
|
||||
### Changed
|
||||
|
||||
- **DEPRECATED**: The `date-fns` CDN scripts are now deprecated and will be removed in the next major release. Please switch to the new `@date-fns/cdn` package for CDN usage.
|
||||
|
||||
- Removed CDN source maps to reduce the package size. If you rely on them, please switch to the new `@date-fns/cdn` package that still includes them.
|
||||
|
||||
## v4.3.0 - 2026-05-22
|
||||
|
||||
Kudos to [@ImRodry](https://github.com/ImRodry) and [@puneetdixit200](https://github.com/puneetdixit200) for their contributions.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed missing modularized optimization fallback ([for Next.js and others](https://x.com/kossnocorp/status/1731181274579325260)). See [#4193](https://x.com/kossnocorp/status/1731181274579325260).
|
||||
|
||||
- Fixed `pt` locale first day of week to be Sunday. See [#4195](https://github.com/date-fns/date-fns/pull/4195) by [@ImRodry](https://github.com/ImRodry).
|
||||
|
||||
- Fixed `zh-CN`, `zh-HK`, and `zh-TW` locale month parsing for October, November, and December. See [#4194](https://github.com/date-fns/date-fns/pull/4194) by [@puneetdixit200](https://github.com/puneetdixit200).
|
||||
|
||||
### Changed
|
||||
|
||||
- Made `package.json` a bit smaller by removing dev fields when building the package.
|
||||
|
||||
## v4.2.1 - 2026-05-19
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed type definitions missing in v4.2.0 due to TypeScript misconfiguration.
|
||||
|
||||
## v4.2.0 - 2026-05-18
|
||||
|
||||
This is a minor release in all senses, it only includes documentation updates (first of many) that points to the new [You Don't Need date-fns\*](https://date-fns.org/you-dont-need-date-fns) page.
|
||||
|
||||
\* Not really
|
||||
|
||||
### Changed
|
||||
|
||||
- Added Temporal API references to the JSDoc annotations of `add`, `addBusinessDays`, and `addDays`.
|
||||
|
||||
## v4.1.0 - 2024-09-17
|
||||
|
||||
This release adds time zone support to format functions (that I somehow missed when working on the feature) and fixes a few bugs.
|
||||
@@ -241,7 +293,6 @@ This release is brought to you by @kossnocorp.
|
||||
- **BREAKING** The arguments are not explicitly converted to the target types. Instead, they are passed as is, delegating this task to type checkers.
|
||||
|
||||
- **BREAKING**: Functions that accept `Interval` arguments now do not throw an error if the start is before the end and handle it as a negative interval. If one of the properties in an `Invalid Date`, these functions also do not throw and handle them as invalid intervals.
|
||||
|
||||
- `areIntervalsOverlapping` normalize intervals before comparison, so `{ start: a, end: b }` is practically equivalent to `{ start: b, end: a }`. When comparing intervals with one of the properties being `Invalid Date`, the function will return false unless the others are valid and equal, given the `inclusive` option is passed. Otherwise, and when even one of the intervals has both properties invalid, the function will always return `false`.
|
||||
|
||||
- `getOverlappingDaysInIntervals` now normalizes intervals before comparison, so `{ start: a, end: b }` is practically equivalent to `{ start: b, end: a }`. If any of the intervals’ properties is an `Invalid Date`, the function will always return 0.
|
||||
@@ -1286,7 +1337,6 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
```
|
||||
|
||||
- **BREAKING** renamed ISO week-numbering year helpers:
|
||||
|
||||
- `addISOYears` → `addISOWeekYears`
|
||||
- `differenceInCalendarISOYears` → `differenceInCalendarISOWeekYears`
|
||||
- `differenceInISOYears` → `differenceInISOWeekYears`
|
||||
@@ -1303,7 +1353,6 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
e.g., `startOfWeekYear`.
|
||||
|
||||
- **BREAKING**: functions renamed:
|
||||
|
||||
- `areRangesOverlapping` → `areIntervalsOverlapping`
|
||||
- `eachDay` → `eachDayOfInterval`
|
||||
- `getOverlappingDaysInRanges` → `getOverlappingDaysInIntervals`
|
||||
@@ -1371,7 +1420,6 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
```
|
||||
|
||||
- **BREAKING**: functions renamed:
|
||||
|
||||
- `distanceInWords` → `formatDistance`
|
||||
- `distanceInWordsStrict` → `formatDistanceStrict`
|
||||
- `distanceInWordsToNow` → `formatDistanceToNow`
|
||||
@@ -1468,7 +1516,6 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
- **BREAKING**: new locale format.
|
||||
See [docs/Locale](https://date-fns.org/docs/Locale).
|
||||
Locales renamed:
|
||||
|
||||
- `en` → `en-US`
|
||||
- `zh_cn` → `zh-CN`
|
||||
- `zh_tw` → `zh-TW`
|
||||
@@ -1530,7 +1577,6 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
| NaN | Invalid Date | NaN | 'NaN' | false |
|
||||
|
||||
Notes:
|
||||
|
||||
- as before, arguments expected to be `Date` are converted to `Date` using _date-fns'_ `toDate` function;
|
||||
- arguments expected to be numbers are converted to integer numbers using our custom `toInteger` implementation
|
||||
(see [#765](https://github.com/date-fns/date-fns/pull/765));
|
||||
@@ -1542,7 +1588,6 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
|
||||
If any resulting argument is invalid (i.e. `NaN` for numbers and `Invalid Date` for dates),
|
||||
an invalid value will be returned:
|
||||
|
||||
- `false` for functions that return booleans (expect `isValid`);
|
||||
- `Invalid Date` for functions that return dates;
|
||||
- and `NaN` for functions that return numbers.
|
||||
@@ -1636,7 +1681,6 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
See PR [#558](https://github.com/date-fns/date-fns/pull/558)
|
||||
|
||||
- New locale-dependent week-numbering year helpers:
|
||||
|
||||
- `getWeek`
|
||||
|
||||
- `getWeekYear`
|
||||
@@ -1652,7 +1696,6 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
- [Added `getUnixTime` function](https://github.com/date-fns/date-fns/pull/870). Kudos to [@Kingwl](https://github.com/Kingwl).
|
||||
|
||||
- [New decade helpers](https://github.com/date-fns/date-fns/pull/839). Thanks to [@y-nk](https://github.com/y-nk)!
|
||||
|
||||
- `getDecade`
|
||||
|
||||
- `startOfDecade`
|
||||
@@ -1666,7 +1709,6 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
- Added new function `fromUnixTime`. Thanks to [@xkizer](https://github.com/xkizer).
|
||||
|
||||
- New interval, month, and year helpers to fetch a list of all Saturdays and Sundays (weekends) for a given date interval. `eachWeekendOfInterval` is the handler function while the other two are wrapper functions. Kudos to [@laekettavong](https://github.com/laekettavong)!
|
||||
|
||||
- `eachWeekendOfInterval`
|
||||
|
||||
- `eachWeekendOfMonth`
|
||||
@@ -1678,13 +1720,11 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
- `parseISO` function that parses ISO 8601 strings. See [#1023](https://github.com/date-fns/date-fns/pull/1023).
|
||||
|
||||
- Add constants that can be imported directly from `date-fns` or the submodule `date-fns/constants`:
|
||||
|
||||
- `maxTime`
|
||||
|
||||
- `minTime`
|
||||
|
||||
- New locales:
|
||||
|
||||
- [Norwegian Nynorsk locale (nn)](https://github.com/date-fns/date-fns/pull/1172)
|
||||
by [@draperunner](https://github.com/draperunner).
|
||||
|
||||
@@ -2220,7 +2260,6 @@ If you're upgrading from v2 alpha or beta, [see the pre-release changelog](https
|
||||
- [Flow](http://flowtype.org/) declarations for each function
|
||||
in [the ".js.flow" style](http://flowtype.org/docs/declarations.html#declaration-files).
|
||||
Kudos to [@JohnyDays](https://github.com/JohnyDays). See related PRs:
|
||||
|
||||
- [#205](https://github.com/date-fns/date-fns/pull/205)
|
||||
|
||||
- [#207](https://github.com/date-fns/date-fns/pull/207)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
🔥️ **NEW**: [date-fns v4.0 with first-class time zone support is out!](https://blog.date-fns.org/v40-with-time-zone-support/)
|
||||
|
||||
<img alt="date-fns" title="date-fns" src="https://raw.githubusercontent.com/date-fns/date-fns/master/docs/logotype.svg" width="150" />
|
||||
<img alt="date-fns" title="date-fns" src="https://raw.githubusercontent.com/date-fns/date-fns/refs/heads/main/pkgs/core/docs/logotype.svg" width="150" />
|
||||
|
||||
date-fns provides the most comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ Security updates are applied only to the latest release.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.**
|
||||
If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.**
|
||||
This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.
|
||||
Please disclose it to [Sasha Koss](mailto:koss@nocorp.me). This project is maintained by a team of volunteers
|
||||
on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
export { enUS as defaultLocale } from "../locale/en-US.js";
|
||||
export { enUS as defaultLocale } from "../locale/en-US.ts";
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
export { enUS as defaultLocale } from "../locale/en-US.js";
|
||||
export { enUS as defaultLocale } from "../locale/en-US.ts";
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import type {
|
||||
Locale,
|
||||
LocalizedOptions,
|
||||
WeekOptions,
|
||||
} from "../types.js";
|
||||
} from "../types.ts";
|
||||
export type DefaultOptions = LocalizedOptions<keyof Locale> &
|
||||
WeekOptions &
|
||||
FirstWeekContainsDateOptions;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import type {
|
||||
Locale,
|
||||
LocalizedOptions,
|
||||
WeekOptions,
|
||||
} from "../types.js";
|
||||
} from "../types.ts";
|
||||
export type DefaultOptions = LocalizedOptions<keyof Locale> &
|
||||
WeekOptions &
|
||||
FirstWeekContainsDateOptions;
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import type { Localize } from "../../locale/types.js";
|
||||
import type { Localize } from "../../locale/types.ts";
|
||||
import type {
|
||||
FirstWeekContainsDateOptions,
|
||||
LocalizedOptions,
|
||||
WeekOptions,
|
||||
} from "../../types.js";
|
||||
} from "../../types.ts";
|
||||
type Formatter = (
|
||||
date: Date,
|
||||
token: string,
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import type { Localize } from "../../locale/types.js";
|
||||
import type { Localize } from "../../locale/types.ts";
|
||||
import type {
|
||||
FirstWeekContainsDateOptions,
|
||||
LocalizedOptions,
|
||||
WeekOptions,
|
||||
} from "../../types.js";
|
||||
} from "../../types.ts";
|
||||
type Formatter = (
|
||||
date: Date,
|
||||
token: string,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { FormatLong } from "../../locale/types.js";
|
||||
import type { FormatLong } from "../../locale/types.ts";
|
||||
type LongFormatter = (pattern: string, formatLong: FormatLong) => string;
|
||||
export declare const longFormatters: Record<string, LongFormatter>;
|
||||
export {};
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { FormatLong } from "../../locale/types.js";
|
||||
import type { FormatLong } from "../../locale/types.ts";
|
||||
type LongFormatter = (pattern: string, formatLong: FormatLong) => string;
|
||||
export declare const longFormatters: Record<string, LongFormatter>;
|
||||
export {};
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { RoundingMethod } from "../types.js";
|
||||
import type { RoundingMethod } from "../types.ts";
|
||||
export declare function getRoundingMethod(
|
||||
method: RoundingMethod | undefined,
|
||||
): (number: number) => number;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { RoundingMethod } from "../types.js";
|
||||
import type { RoundingMethod } from "../types.ts";
|
||||
export declare function getRoundingMethod(
|
||||
method: RoundingMethod | undefined,
|
||||
): (number: number) => number;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg } from "../types.js";
|
||||
import type { DateArg } from "../types.ts";
|
||||
/**
|
||||
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
||||
* They usually appear for dates that denote time before the timezones were introduced
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg } from "../types.js";
|
||||
import type { DateArg } from "../types.ts";
|
||||
/**
|
||||
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
||||
* They usually appear for dates that denote time before the timezones were introduced
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextFn, DateArg } from "../types.js";
|
||||
import type { ContextFn, DateArg } from "../types.ts";
|
||||
export declare function normalizeDates(
|
||||
context: ContextFn<Date> | undefined,
|
||||
...dates: [DateArg<Date>, DateArg<Date>, DateArg<Date>]
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextFn, DateArg } from "../types.js";
|
||||
import type { ContextFn, DateArg } from "../types.ts";
|
||||
export declare function normalizeDates(
|
||||
context: ContextFn<Date> | undefined,
|
||||
...dates: [DateArg<Date>, DateArg<Date>, DateArg<Date>]
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextFn, Interval, NormalizedInterval } from "../types.js";
|
||||
import type { ContextFn, Interval, NormalizedInterval } from "../types.ts";
|
||||
export declare function normalizeInterval(
|
||||
context: ContextFn<Date> | undefined,
|
||||
interval: Interval,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextFn, Interval, NormalizedInterval } from "../types.js";
|
||||
import type { ContextFn, Interval, NormalizedInterval } from "../types.ts";
|
||||
export declare function normalizeInterval(
|
||||
context: ContextFn<Date> | undefined,
|
||||
interval: Interval,
|
||||
|
||||
+3
-8
@@ -6,7 +6,6 @@ exports.resetDefaultOptions = resetDefaultOptions;
|
||||
var _vitest = require("./test/vitest");
|
||||
var _index = require("./addLeadingZeros.cjs");
|
||||
var _index2 = require("./defaultOptions.cjs");
|
||||
var _sinon = require("./test/sinon");
|
||||
|
||||
function assertType(_value) {}
|
||||
|
||||
@@ -39,20 +38,16 @@ function generateOffset(originalDate) {
|
||||
}
|
||||
|
||||
function fakeDate(date) {
|
||||
let clock;
|
||||
|
||||
function fakeNow(date) {
|
||||
clock?.restore();
|
||||
clock = _sinon.default.useFakeTimers(+date);
|
||||
_vitest.vi.setSystemTime(date);
|
||||
}
|
||||
|
||||
(0, _vitest.beforeEach)(() => {
|
||||
fakeNow(+date);
|
||||
_vitest.vi.useFakeTimers({ now: date });
|
||||
});
|
||||
|
||||
(0, _vitest.afterEach)(() => {
|
||||
clock?.restore();
|
||||
clock = undefined;
|
||||
_vitest.vi.useRealTimers();
|
||||
});
|
||||
|
||||
return { fakeNow };
|
||||
|
||||
+4
-9
@@ -1,7 +1,6 @@
|
||||
import { afterEach, beforeEach } from "./test/vitest";
|
||||
import { afterEach, beforeEach, vi } from "./test/vitest";
|
||||
import { addLeadingZeros } from "./addLeadingZeros.js";
|
||||
import { setDefaultOptions } from "./defaultOptions.js";
|
||||
import sinon from "./test/sinon";
|
||||
|
||||
export function assertType(_value) {}
|
||||
|
||||
@@ -31,20 +30,16 @@ export function generateOffset(originalDate) {
|
||||
}
|
||||
|
||||
export function fakeDate(date) {
|
||||
let clock;
|
||||
|
||||
function fakeNow(date) {
|
||||
clock?.restore();
|
||||
clock = sinon.useFakeTimers(+date);
|
||||
vi.setSystemTime(date);
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
fakeNow(+date);
|
||||
vi.useFakeTimers({ now: date });
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
clock?.restore();
|
||||
clock = undefined;
|
||||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
return { fakeNow };
|
||||
|
||||
+29
@@ -17,6 +17,19 @@ var _index4 = require("./toDate.cjs");
|
||||
* @description
|
||||
* Add the specified years, months, weeks, days, hours, minutes, and seconds to the given date.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal has a built-in `add` method on all its classes:
|
||||
*
|
||||
* - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
||||
* - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
||||
* - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
||||
* - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
||||
* - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
||||
* - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @typeParam DateType - The `Date` type the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
@@ -38,6 +51,22 @@ var _index4 = require("./toDate.cjs");
|
||||
* seconds: 30,
|
||||
* })
|
||||
* //=> Thu Jun 15 2017 15:29:20
|
||||
*
|
||||
* @example
|
||||
* // Using Temporal:
|
||||
* // Add the following duration to 1 September 2014, 10:19:50
|
||||
* Temporal.PlainDateTime.from("2014-09-01T10:19:50")
|
||||
* .add({
|
||||
* years: 2,
|
||||
* months: 9,
|
||||
* weeks: 1,
|
||||
* days: 7,
|
||||
* hours: 5,
|
||||
* minutes: 9,
|
||||
* seconds: 30,
|
||||
* })
|
||||
* .toString();
|
||||
* //=> "2017-06-15T15:29:20"
|
||||
*/
|
||||
function add(date, duration, options) {
|
||||
const {
|
||||
|
||||
+30
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg, Duration } from "./types.js";
|
||||
import type { ContextOptions, DateArg, Duration } from "./types.ts";
|
||||
/**
|
||||
* The {@link add} function options.
|
||||
*/
|
||||
@@ -12,6 +12,19 @@ export interface AddOptions<DateType extends Date = Date>
|
||||
* @description
|
||||
* Add the specified years, months, weeks, days, hours, minutes, and seconds to the given date.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal has a built-in `add` method on all its classes:
|
||||
*
|
||||
* - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
||||
* - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
||||
* - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
||||
* - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
||||
* - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
||||
* - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @typeParam DateType - The `Date` type the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
@@ -33,6 +46,22 @@ export interface AddOptions<DateType extends Date = Date>
|
||||
* seconds: 30,
|
||||
* })
|
||||
* //=> Thu Jun 15 2017 15:29:20
|
||||
*
|
||||
* @example
|
||||
* // Using Temporal:
|
||||
* // Add the following duration to 1 September 2014, 10:19:50
|
||||
* Temporal.PlainDateTime.from("2014-09-01T10:19:50")
|
||||
* .add({
|
||||
* years: 2,
|
||||
* months: 9,
|
||||
* weeks: 1,
|
||||
* days: 7,
|
||||
* hours: 5,
|
||||
* minutes: 9,
|
||||
* seconds: 30,
|
||||
* })
|
||||
* .toString();
|
||||
* //=> "2017-06-15T15:29:20"
|
||||
*/
|
||||
export declare function add<
|
||||
DateType extends Date,
|
||||
|
||||
+30
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg, Duration } from "./types.js";
|
||||
import type { ContextOptions, DateArg, Duration } from "./types.ts";
|
||||
/**
|
||||
* The {@link add} function options.
|
||||
*/
|
||||
@@ -12,6 +12,19 @@ export interface AddOptions<DateType extends Date = Date>
|
||||
* @description
|
||||
* Add the specified years, months, weeks, days, hours, minutes, and seconds to the given date.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal has a built-in `add` method on all its classes:
|
||||
*
|
||||
* - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
||||
* - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
||||
* - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
||||
* - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
||||
* - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
||||
* - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @typeParam DateType - The `Date` type the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
@@ -33,6 +46,22 @@ export interface AddOptions<DateType extends Date = Date>
|
||||
* seconds: 30,
|
||||
* })
|
||||
* //=> Thu Jun 15 2017 15:29:20
|
||||
*
|
||||
* @example
|
||||
* // Using Temporal:
|
||||
* // Add the following duration to 1 September 2014, 10:19:50
|
||||
* Temporal.PlainDateTime.from("2014-09-01T10:19:50")
|
||||
* .add({
|
||||
* years: 2,
|
||||
* months: 9,
|
||||
* weeks: 1,
|
||||
* days: 7,
|
||||
* hours: 5,
|
||||
* minutes: 9,
|
||||
* seconds: 30,
|
||||
* })
|
||||
* .toString();
|
||||
* //=> "2017-06-15T15:29:20"
|
||||
*/
|
||||
export declare function add<
|
||||
DateType extends Date,
|
||||
|
||||
+29
@@ -15,6 +15,19 @@ import { toDate } from "./toDate.js";
|
||||
* @description
|
||||
* Add the specified years, months, weeks, days, hours, minutes, and seconds to the given date.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal has a built-in `add` method on all its classes:
|
||||
*
|
||||
* - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
||||
* - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
||||
* - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
||||
* - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
||||
* - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
||||
* - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @typeParam DateType - The `Date` type the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
@@ -36,6 +49,22 @@ import { toDate } from "./toDate.js";
|
||||
* seconds: 30,
|
||||
* })
|
||||
* //=> Thu Jun 15 2017 15:29:20
|
||||
*
|
||||
* @example
|
||||
* // Using Temporal:
|
||||
* // Add the following duration to 1 September 2014, 10:19:50
|
||||
* Temporal.PlainDateTime.from("2014-09-01T10:19:50")
|
||||
* .add({
|
||||
* years: 2,
|
||||
* months: 9,
|
||||
* weeks: 1,
|
||||
* days: 7,
|
||||
* hours: 5,
|
||||
* minutes: 9,
|
||||
* seconds: 30,
|
||||
* })
|
||||
* .toString();
|
||||
* //=> "2017-06-15T15:29:20"
|
||||
*/
|
||||
export function add(date, duration, options) {
|
||||
const {
|
||||
|
||||
+6
@@ -18,6 +18,12 @@ var _index5 = require("./toDate.cjs");
|
||||
* @description
|
||||
* Add the specified number of business days (mon - fri) to the given date, ignoring weekends.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal doesn't have built-in business day arithmetic, so you still need date-fns for this.
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @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, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
|
||||
+7
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addBusinessDays} function options.
|
||||
*/
|
||||
@@ -12,6 +12,12 @@ export interface AddBusinessDaysOptions<DateType extends Date = Date>
|
||||
* @description
|
||||
* Add the specified number of business days (mon - fri) to the given date, ignoring weekends.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal doesn't have built-in business day arithmetic, so you still need date-fns for this.
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @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, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
|
||||
+7
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addBusinessDays} function options.
|
||||
*/
|
||||
@@ -12,6 +12,12 @@ export interface AddBusinessDaysOptions<DateType extends Date = Date>
|
||||
* @description
|
||||
* Add the specified number of business days (mon - fri) to the given date, ignoring weekends.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal doesn't have built-in business day arithmetic, so you still need date-fns for this.
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @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, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
|
||||
+6
@@ -16,6 +16,12 @@ import { toDate } from "./toDate.js";
|
||||
* @description
|
||||
* Add the specified number of business days (mon - fri) to the given date, ignoring weekends.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal doesn't have built-in business day arithmetic, so you still need date-fns for this.
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @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, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
|
||||
+19
@@ -15,6 +15,19 @@ var _index2 = require("./toDate.cjs");
|
||||
* @description
|
||||
* Add the specified number of days to the given date.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal has a built-in `add` method on all its classes:
|
||||
*
|
||||
* - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
||||
* - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
||||
* - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
||||
* - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
||||
* - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
||||
* - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @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, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
@@ -28,6 +41,12 @@ var _index2 = require("./toDate.cjs");
|
||||
* // Add 10 days to 1 September 2014:
|
||||
* const result = addDays(new Date(2014, 8, 1), 10)
|
||||
* //=> Thu Sep 11 2014 00:00:00
|
||||
*
|
||||
* @example
|
||||
* // Using Temporal:
|
||||
* // Add 10 days to 1 September 2014:
|
||||
* Temporal.PlainDate.from("2014-09-01").add({ days: 10 }).toString();
|
||||
* //=> "2014-09-11"
|
||||
*/
|
||||
function addDays(date, amount, options) {
|
||||
const _date = (0, _index2.toDate)(date, options?.in);
|
||||
|
||||
+20
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addDays} function options.
|
||||
*/
|
||||
@@ -12,6 +12,19 @@ export interface AddDaysOptions<DateType extends Date = Date>
|
||||
* @description
|
||||
* Add the specified number of days to the given date.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal has a built-in `add` method on all its classes:
|
||||
*
|
||||
* - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
||||
* - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
||||
* - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
||||
* - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
||||
* - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
||||
* - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @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, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
@@ -25,6 +38,12 @@ export interface AddDaysOptions<DateType extends Date = Date>
|
||||
* // Add 10 days to 1 September 2014:
|
||||
* const result = addDays(new Date(2014, 8, 1), 10)
|
||||
* //=> Thu Sep 11 2014 00:00:00
|
||||
*
|
||||
* @example
|
||||
* // Using Temporal:
|
||||
* // Add 10 days to 1 September 2014:
|
||||
* Temporal.PlainDate.from("2014-09-01").add({ days: 10 }).toString();
|
||||
* //=> "2014-09-11"
|
||||
*/
|
||||
export declare function addDays<
|
||||
DateType extends Date,
|
||||
|
||||
+20
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addDays} function options.
|
||||
*/
|
||||
@@ -12,6 +12,19 @@ export interface AddDaysOptions<DateType extends Date = Date>
|
||||
* @description
|
||||
* Add the specified number of days to the given date.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal has a built-in `add` method on all its classes:
|
||||
*
|
||||
* - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
||||
* - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
||||
* - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
||||
* - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
||||
* - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
||||
* - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @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, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
@@ -25,6 +38,12 @@ export interface AddDaysOptions<DateType extends Date = Date>
|
||||
* // Add 10 days to 1 September 2014:
|
||||
* const result = addDays(new Date(2014, 8, 1), 10)
|
||||
* //=> Thu Sep 11 2014 00:00:00
|
||||
*
|
||||
* @example
|
||||
* // Using Temporal:
|
||||
* // Add 10 days to 1 September 2014:
|
||||
* Temporal.PlainDate.from("2014-09-01").add({ days: 10 }).toString();
|
||||
* //=> "2014-09-11"
|
||||
*/
|
||||
export declare function addDays<
|
||||
DateType extends Date,
|
||||
|
||||
+19
@@ -13,6 +13,19 @@ import { toDate } from "./toDate.js";
|
||||
* @description
|
||||
* Add the specified number of days to the given date.
|
||||
*
|
||||
* **You don't need date-fns\***:
|
||||
*
|
||||
* Temporal has a built-in `add` method on all its classes:
|
||||
*
|
||||
* - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
||||
* - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
||||
* - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
||||
* - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
||||
* - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
||||
* - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
||||
*
|
||||
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
||||
*
|
||||
* @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, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
@@ -26,6 +39,12 @@ import { toDate } from "./toDate.js";
|
||||
* // Add 10 days to 1 September 2014:
|
||||
* const result = addDays(new Date(2014, 8, 1), 10)
|
||||
* //=> Thu Sep 11 2014 00:00:00
|
||||
*
|
||||
* @example
|
||||
* // Using Temporal:
|
||||
* // Add 10 days to 1 September 2014:
|
||||
* Temporal.PlainDate.from("2014-09-01").add({ days: 10 }).toString();
|
||||
* //=> "2014-09-11"
|
||||
*/
|
||||
export function addDays(date, amount, options) {
|
||||
const _date = toDate(date, options?.in);
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addHours} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addHours} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addISOWeekYears} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addISOWeekYears} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addMilliseconds} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addMilliseconds} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addMinutes} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addMinutes} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addMonths} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addMonths} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addQuarters} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addQuarters} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addSeconds} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addSeconds} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addWeeks} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addWeeks} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addYears} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link addYears} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, Interval } from "./types.js";
|
||||
import type { ContextOptions, Interval } from "./types.ts";
|
||||
/**
|
||||
* The {@link areIntervalsOverlapping} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, Interval } from "./types.js";
|
||||
import type { ContextOptions, Interval } from "./types.ts";
|
||||
/**
|
||||
* The {@link areIntervalsOverlapping} function options.
|
||||
*/
|
||||
|
||||
+9907
-2286
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
+4
-3
File diff suppressed because one or more lines are too long
-10
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg, Interval } from "./types.js";
|
||||
import type { ContextOptions, DateArg, Interval } from "./types.ts";
|
||||
/**
|
||||
* The {@link clamp} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg, Interval } from "./types.js";
|
||||
import type { ContextOptions, DateArg, Interval } from "./types.ts";
|
||||
/**
|
||||
* The {@link clamp} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg } from "./types.js";
|
||||
import type { DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name closestIndexTo
|
||||
* @category Common Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg } from "./types.js";
|
||||
import type { DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name closestIndexTo
|
||||
* @category Common Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link closestTo} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link closestTo} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg } from "./types.js";
|
||||
import type { DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name compareAsc
|
||||
* @category Common Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg } from "./types.js";
|
||||
import type { DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name compareAsc
|
||||
* @category Common Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg } from "./types.js";
|
||||
import type { DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name compareDesc
|
||||
* @category Common Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg } from "./types.js";
|
||||
import type { DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name compareDesc
|
||||
* @category Common Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ConstructableDate, ContextFn, DateArg } from "./types.js";
|
||||
import type { ConstructableDate, ContextFn, DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name constructFrom
|
||||
* @category Generic Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ConstructableDate, ContextFn, DateArg } from "./types.js";
|
||||
import type { ConstructableDate, ContextFn, DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name constructFrom
|
||||
* @category Generic Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextFn, DateArg } from "./types.js";
|
||||
import type { ContextFn, DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name constructNow
|
||||
* @category Generic Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextFn, DateArg } from "./types.js";
|
||||
import type { ContextFn, DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name constructNow
|
||||
* @category Generic Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInBusinessDays} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInBusinessDays} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarDays} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarDays} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarISOWeekYears} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarISOWeekYears} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarISOWeeks} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarISOWeeks} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarMonths} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarMonths} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarQuarters} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarQuarters} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import type {
|
||||
DateArg,
|
||||
LocalizedOptions,
|
||||
WeekOptions,
|
||||
} from "./types.js";
|
||||
} from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarWeeks} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import type {
|
||||
DateArg,
|
||||
LocalizedOptions,
|
||||
WeekOptions,
|
||||
} from "./types.js";
|
||||
} from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarWeeks} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarYears} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInCalendarYears} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInDays} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInDays} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg, RoundingOptions } from "./types.js";
|
||||
import type { ContextOptions, DateArg, RoundingOptions } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInHours} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg, RoundingOptions } from "./types.js";
|
||||
import type { ContextOptions, DateArg, RoundingOptions } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInHours} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInISOWeekYears} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInISOWeekYears} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg } from "./types.js";
|
||||
import type { DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name differenceInMilliseconds
|
||||
* @category Millisecond Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg } from "./types.js";
|
||||
import type { DateArg } from "./types.ts";
|
||||
/**
|
||||
* @name differenceInMilliseconds
|
||||
* @category Millisecond Helpers
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg, RoundingOptions } from "./types.js";
|
||||
import type { DateArg, RoundingOptions } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInMinutes} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DateArg, RoundingOptions } from "./types.js";
|
||||
import type { DateArg, RoundingOptions } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInMinutes} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInMonths} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
import type { ContextOptions, DateArg } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInMonths} function options.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ContextOptions, DateArg, RoundingOptions } from "./types.js";
|
||||
import type { ContextOptions, DateArg, RoundingOptions } from "./types.ts";
|
||||
/**
|
||||
* The {@link differenceInQuarters} function options.
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user