UEA-PRODEM

This commit is contained in:
2026-06-10 12:14:46 -03:00
parent f54126b9d8
commit 9947565694
5319 changed files with 148520 additions and 129332 deletions
+1 -1
View File
@@ -1 +1 @@
export { enUS as defaultLocale } from "../locale/en-US.js";
export { enUS as defaultLocale } from "../locale/en-US.ts";
+1 -1
View File
@@ -1 +1 @@
export { enUS as defaultLocale } from "../locale/en-US.js";
export { enUS as defaultLocale } from "../locale/en-US.ts";
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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 };