@trackunit/date-and-time-utils 1.7.115 → 1.7.119

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/date-and-time-utils",
3
- "version": "1.7.115",
3
+ "version": "1.7.119",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -5,6 +5,11 @@ export type TemporalDate = Temporal.Instant | Temporal.ZonedDateTime | Date;
5
5
  type TemporalFormatTypes = Intl.DateTimeFormatOptions;
6
6
  type TemporalTimeTypes = Extract<Intl.RelativeTimeFormatUnit, "days" | "hours" | "minutes" | "seconds">;
7
7
  type TemporalFormatSelector = "dateOnly" | "timeOnly";
8
+ export interface TimeZoneDetails {
9
+ id: string;
10
+ offset: string;
11
+ name: string;
12
+ }
8
13
  export type TemporalFormatStyle = Intl.ListFormatStyle;
9
14
  export interface DateRange {
10
15
  start?: Date;
@@ -22,11 +27,7 @@ export interface TemporalFormat {
22
27
  * @param timeZoneId - The time zone to use for the conversion.
23
28
  * returns A time zone object. { id: string, offset: string, name: string }
24
29
  */
25
- export declare const getTimeZone: (timeZoneId?: string) => {
26
- id: string;
27
- offset: string;
28
- name: string;
29
- };
30
+ export declare const getTimeZone: (timeZoneId?: string) => TimeZoneDetails;
30
31
  /**
31
32
  * get the offset count for a given timezone. Europe/Berlin would return +2:00
32
33
  *
@@ -890,7 +891,7 @@ export declare const monthNameUtil: (date: TemporalDate, format: TemporalFormatS
890
891
  * @param {TemporalFormatStyle} format - select the format of the month name
891
892
  * @param {string} locale - The locale to use for formatting. If not provided, the system's default locale will be used.
892
893
  */
893
- export declare const monthsUtil: (format?: TemporalFormatStyle, locale?: string) => string[];
894
+ export declare const monthsUtil: (format?: TemporalFormatStyle, locale?: string) => Array<string>;
894
895
  /**
895
896
  * Returns the day name for the given date.
896
897
  *
@@ -921,7 +922,7 @@ export declare const dayNameUtil: (date: TemporalDate, format: TemporalFormatSty
921
922
  * @param {TemporalFormatStyle} format - select the format of the day name
922
923
  * @param {string} locale - The locale to use for formatting. If not provided, the system's default locale will be used.
923
924
  */
924
- export declare const daysUtil: (format?: TemporalFormatStyle, locale?: string) => string[];
925
+ export declare const daysUtil: (format?: TemporalFormatStyle, locale?: string) => Array<string>;
925
926
  /**
926
927
  * Returns the UTC date-time for the given time zone.
927
928
  *