From f36b819bcb17a640e514dc51181fca4d489acbc6 Mon Sep 17 00:00:00 2001 From: csandman Date: Fri, 25 Oct 2024 13:31:00 -0400 Subject: [PATCH 1/2] Fix the doc comments on the TZDate and TZDateMini classes --- src/date/index.js | 17 ++++++++++------- src/date/mini.js | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/date/index.js b/src/date/index.js index d03673b..efa46d4 100644 --- a/src/date/index.js +++ b/src/date/index.js @@ -1,17 +1,20 @@ import { TZDateMini } from "./mini.js"; /** - * UTC date class. It maps getters and setters to corresponding UTC methods, - * forcing all calculations in the UTC time zone. + * Time zone date class. It overrides original Date functions making them + * to perform all the calculations in the given time zone. + * + * It also provides new functions useful when working with time zones. * * Combined with date-fns, it allows using the class the same way as * the original date class. * - * This complete version provides not only getters, setters, - * and `getTimezoneOffset`, but also the formatter functions, mirroring - * all original `Date` functionality. Use this version when you need to format - * a string or in an environment you don't fully control (a library). - * For a minimal version, see `UTCDateMini`. + * This complete version provides formatter functions, mirroring all original + * methods of the `Date` class. It's build-size-heavier than `TZDateMini` and + * should be used when you need to format a string or in an environment you + * don't fully control (a library). + * + * For the minimal version, see `TZDateMini`. */ export class TZDate extends TZDateMini { //#region static diff --git a/src/date/mini.js b/src/date/mini.js index b806504..ce6933a 100644 --- a/src/date/mini.js +++ b/src/date/mini.js @@ -1,5 +1,19 @@ import { tzOffset } from "../tzOffset/index.ts"; +/** + * Time zone date class. It overrides original Date functions making them + * to perform all the calculations in the given time zone. + * + * It also provides new functions useful when working with time zones. + * + * Combined with date-fns, it allows using the class the same way as + * the original date class. + * + * This minimal version provides complete functionality required for date-fns + * and excludes build-size-heavy formatter functions. + * + * For the complete version, see `TZDate`. + */ export class TZDateMini extends Date { //#region static From f418940cdaa6b811a49ccffb39cccc53735035ed Mon Sep 17 00:00:00 2001 From: csandman Date: Thu, 31 Oct 2024 10:22:11 -0400 Subject: [PATCH 2/2] Remove the doc comments entirely --- src/date/index.js | 16 ---------------- src/date/mini.js | 14 -------------- 2 files changed, 30 deletions(-) diff --git a/src/date/index.js b/src/date/index.js index efa46d4..279e323 100644 --- a/src/date/index.js +++ b/src/date/index.js @@ -1,21 +1,5 @@ import { TZDateMini } from "./mini.js"; -/** - * Time zone date class. It overrides original Date functions making them - * to perform all the calculations in the given time zone. - * - * It also provides new functions useful when working with time zones. - * - * Combined with date-fns, it allows using the class the same way as - * the original date class. - * - * This complete version provides formatter functions, mirroring all original - * methods of the `Date` class. It's build-size-heavier than `TZDateMini` and - * should be used when you need to format a string or in an environment you - * don't fully control (a library). - * - * For the minimal version, see `TZDateMini`. - */ export class TZDate extends TZDateMini { //#region static diff --git a/src/date/mini.js b/src/date/mini.js index ce6933a..b806504 100644 --- a/src/date/mini.js +++ b/src/date/mini.js @@ -1,19 +1,5 @@ import { tzOffset } from "../tzOffset/index.ts"; -/** - * Time zone date class. It overrides original Date functions making them - * to perform all the calculations in the given time zone. - * - * It also provides new functions useful when working with time zones. - * - * Combined with date-fns, it allows using the class the same way as - * the original date class. - * - * This minimal version provides complete functionality required for date-fns - * and excludes build-size-heavy formatter functions. - * - * For the complete version, see `TZDate`. - */ export class TZDateMini extends Date { //#region static