From 6cc2a89e2b2982a7185e289a9ea8c8f2da969816 Mon Sep 17 00:00:00 2001 From: Mehdi <9340937+meduzen@users.noreply.github.com> Date: Sat, 5 Aug 2023 23:53:17 +0200 Subject: [PATCH] Save some bytes and pre-release 1.3.2 Also: * test precision in `DateTime.to`; * update types (unchanged API); * update documentation and changelog. --- CHANGELOG.md | 7 +++++++ README.md | 25 +++++++++++++------------ package.json | 2 +- pnpm-lock.yaml | 38 +++++++++++++++++++------------------- src/datetime-class.js | 8 ++------ src/utils/date.js | 12 ++++++++---- tests/index.test.js | 9 +++++---- types/datetime-class.d.ts | 4 ++-- 8 files changed, 57 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5bddca..0542ed9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm Compare with [last published version](https://github.com/meduzen/datetime-attribute/compare/1.3.1...main). +### Improved + +- Shorten `daysBetween()` and `DateTime` footprint by a couple of bytes. + +> **Warning**\ +> If not transpiled, `DateTime` now requires support for [`class` fields](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Public_class_fields#browser_compatibility) (Safari 14.0). + ### Under the hood - Replace NPM by pnpm diff --git a/README.md b/README.md index 191fa1c..057b1f5 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,16 @@ Get a [`datetime` attribute](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTimeElement/datetime) for HTML `