@williamthorsen/toolbelt.datetime 3.2.2 → 3.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [datetime-v3.2.4] - 2026-03-19
6
+
7
+ ### Formatting
8
+
9
+ - Fmt: Format changelogs
10
+
5
11
  ## [strings-v3.1.1] - 2026-03-10
6
12
 
7
13
  ### Dependencies
package/dist/esm/.cache CHANGED
@@ -1 +1 @@
1
- 691db0f08321414444edc91a71340c2383b8b68c36536d442af146b63f5f0e83
1
+ 961a989ac4fd1c44fe31b834c250affd185068f4954b6a2edecf4f8c8a32695c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@williamthorsen/toolbelt.datetime",
3
- "version": "3.2.2",
3
+ "version": "3.2.4",
4
4
  "description": "API",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/williamthorsen/toolbelt/tree/main/packages/datetime#readme",
@@ -1,7 +0,0 @@
1
- export declare function getContainingDecades(years: number[]): Decade[];
2
- interface Decade {
3
- startYear: number;
4
- endYear: number;
5
- label: string;
6
- }
7
- export {};
@@ -1,18 +0,0 @@
1
- function getContainingDecades(years) {
2
- const uniqueYears = [...new Set(years)].sort((a, b) => a - b);
3
- const decadesMap = /* @__PURE__ */ new Map();
4
- for (const year of uniqueYears) {
5
- const startYear = Math.floor(year / 10) * 10;
6
- if (!decadesMap.has(startYear)) {
7
- decadesMap.set(startYear, {
8
- startYear,
9
- endYear: startYear + 9,
10
- label: `${startYear}s`
11
- });
12
- }
13
- }
14
- return [...decadesMap.values()];
15
- }
16
- export {
17
- getContainingDecades
18
- };
@@ -1 +0,0 @@
1
- export declare function parseDate(dateInput: Date | number | string | null | undefined): Date | undefined;
@@ -1,10 +0,0 @@
1
- function parseDate(dateInput) {
2
- if (dateInput === null || dateInput === void 0) {
3
- return void 0;
4
- }
5
- const date = new Date(dateInput);
6
- return Number.isNaN(date.getTime()) ? void 0 : date;
7
- }
8
- export {
9
- parseDate
10
- };
@@ -1 +0,0 @@
1
- export declare function getTemporal(): typeof Temporal;
@@ -1,7 +0,0 @@
1
- import { Temporal as TemporalPolyfill } from "@js-temporal/polyfill";
2
- function getTemporal() {
3
- return typeof globalThis.Temporal !== "undefined" ? globalThis.Temporal : TemporalPolyfill;
4
- }
5
- export {
6
- getTemporal
7
- };