@qrvey/utils 1.11.0-0 → 1.11.0-1

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.
Files changed (151) hide show
  1. package/dist/cjs/dates/adapters/ISOToNumericOffset.d.ts +1 -1
  2. package/dist/cjs/dates/adapters/ISOToNumericOffset.js +1 -1
  3. package/dist/cjs/dates/adapters/dateToHms.d.ts +5 -4
  4. package/dist/cjs/dates/adapters/dateToHms.js +14 -14
  5. package/dist/cjs/dates/adapters/dateToMdyDate.d.ts +5 -3
  6. package/dist/cjs/dates/adapters/dateToMdyDate.js +3 -2
  7. package/dist/cjs/dates/adapters/dateToMonthYear.d.ts +5 -3
  8. package/dist/cjs/dates/adapters/dateToMonthYear.js +3 -2
  9. package/dist/cjs/dates/adapters/dateToQuarterYear.d.ts +5 -3
  10. package/dist/cjs/dates/adapters/dateToQuarterYear.js +3 -2
  11. package/dist/cjs/dates/adapters/dateToWeekYear.d.ts +5 -3
  12. package/dist/cjs/dates/adapters/dateToWeekYear.js +3 -2
  13. package/dist/cjs/dates/adapters/dateToYear.d.ts +5 -3
  14. package/dist/cjs/dates/adapters/dateToYear.js +3 -2
  15. package/dist/cjs/dates/adapters/hmsToDate.d.ts +5 -4
  16. package/dist/cjs/dates/adapters/hmsToDate.js +3 -3
  17. package/dist/cjs/dates/adapters/mdyDateToDate.d.ts +5 -4
  18. package/dist/cjs/dates/adapters/mdyDateToDate.js +3 -3
  19. package/dist/cjs/dates/adapters/monthYearToDate.d.ts +5 -4
  20. package/dist/cjs/dates/adapters/monthYearToDate.js +3 -3
  21. package/dist/cjs/dates/adapters/numericOffsetToISO.d.ts +1 -1
  22. package/dist/cjs/dates/adapters/numericOffsetToISO.js +1 -1
  23. package/dist/cjs/dates/adapters/quarterYearToDate.d.ts +5 -4
  24. package/dist/cjs/dates/adapters/quarterYearToDate.js +3 -3
  25. package/dist/cjs/dates/adapters/weekYearToDate.d.ts +5 -4
  26. package/dist/cjs/dates/adapters/weekYearToDate.js +3 -3
  27. package/dist/cjs/dates/adapters/yearToDate.d.ts +5 -4
  28. package/dist/cjs/dates/adapters/yearToDate.js +3 -3
  29. package/dist/cjs/dates/constants/ISO_8601_REGEX.d.ts +11 -0
  30. package/dist/cjs/dates/constants/ISO_8601_REGEX.js +12 -1
  31. package/dist/cjs/dates/helpers/areIncludedDateTokens.d.ts +3 -3
  32. package/dist/cjs/dates/helpers/areIncludedDateTokens.js +3 -3
  33. package/dist/cjs/dates/helpers/getDateByDateFormat.d.ts +6 -5
  34. package/dist/cjs/dates/helpers/getDateByDateFormat.js +4 -4
  35. package/dist/cjs/dates/helpers/getDateByTimezone.d.ts +4 -3
  36. package/dist/cjs/dates/helpers/getDateByTimezone.js +2 -2
  37. package/dist/cjs/dates/helpers/getDateByTimezoneOffset.d.ts +6 -3
  38. package/dist/cjs/dates/helpers/getDateByTimezoneOffset.js +3 -2
  39. package/dist/cjs/dates/helpers/getDateFormatByProperty.d.ts +2 -2
  40. package/dist/cjs/dates/helpers/getDateFormatByProperty.js +2 -2
  41. package/dist/cjs/dates/helpers/getDateFormatRegularExpressionInArray.d.ts +1 -1
  42. package/dist/cjs/dates/helpers/getDateFormatRegularExpressionInArray.js +1 -1
  43. package/dist/cjs/dates/helpers/getDefaultDateSettings.d.ts +2 -2
  44. package/dist/cjs/dates/helpers/getDefaultDateSettings.js +2 -2
  45. package/dist/cjs/dates/helpers/getFormattedDateByFormat.d.ts +6 -4
  46. package/dist/cjs/dates/helpers/getFormattedDateByFormat.js +4 -3
  47. package/dist/cjs/dates/helpers/getSeparatorByDateFormat.d.ts +1 -1
  48. package/dist/cjs/dates/helpers/getSeparatorByDateFormat.js +1 -1
  49. package/dist/cjs/dates/helpers/getTimezoneObject.d.ts +1 -1
  50. package/dist/cjs/dates/helpers/getTimezoneObject.js +4 -3
  51. package/dist/cjs/dates/helpers/getUTCFormatByOffset.d.ts +1 -0
  52. package/dist/cjs/dates/helpers/getUTCFormatByOffset.js +1 -0
  53. package/dist/cjs/dates/helpers/getWeek.d.ts +1 -1
  54. package/dist/cjs/dates/helpers/getWeek.js +1 -1
  55. package/dist/cjs/dates/helpers/isValidDateObject.d.ts +1 -1
  56. package/dist/cjs/dates/helpers/isValidDateObject.js +1 -1
  57. package/dist/cjs/dates/helpers/isValidISOOffset.d.ts +3 -2
  58. package/dist/cjs/dates/helpers/isValidISOOffset.js +3 -2
  59. package/dist/cjs/dates/helpers/isValidPotentialDate.d.ts +3 -2
  60. package/dist/cjs/dates/helpers/isValidPotentialDate.js +16 -1
  61. package/dist/cjs/dates/helpers/isValidTimezoneOffset.d.ts +1 -1
  62. package/dist/cjs/dates/helpers/isValidTimezoneOffset.js +15 -4
  63. package/dist/cjs/dates/helpers/validateDate.d.ts +3 -3
  64. package/dist/cjs/dates/helpers/validateDate.js +3 -3
  65. package/dist/cjs/dates/interfaces/IDate.d.ts +1 -0
  66. package/dist/cjs/dates/interfaces/IDate.js +2 -0
  67. package/dist/cjs/filters/helpers/common/getVerboseFilters.d.ts +1 -1
  68. package/dist/cjs/filters/helpers/common/getVerboseFilters.js +64 -27
  69. package/dist/cjs/filters/helpers/settings/getFilterSettings.js +1 -6
  70. package/dist/cjs/globalization/labels/index.d.ts +0 -1
  71. package/dist/cjs/globalization/labels/index.js +0 -1
  72. package/dist/dates/adapters/ISOToNumericOffset.d.ts +1 -1
  73. package/dist/dates/adapters/ISOToNumericOffset.js +1 -1
  74. package/dist/dates/adapters/dateToHms.d.ts +5 -4
  75. package/dist/dates/adapters/dateToHms.js +14 -14
  76. package/dist/dates/adapters/dateToMdyDate.d.ts +5 -3
  77. package/dist/dates/adapters/dateToMdyDate.js +3 -2
  78. package/dist/dates/adapters/dateToMonthYear.d.ts +5 -3
  79. package/dist/dates/adapters/dateToMonthYear.js +3 -2
  80. package/dist/dates/adapters/dateToQuarterYear.d.ts +5 -3
  81. package/dist/dates/adapters/dateToQuarterYear.js +3 -2
  82. package/dist/dates/adapters/dateToWeekYear.d.ts +5 -3
  83. package/dist/dates/adapters/dateToWeekYear.js +3 -2
  84. package/dist/dates/adapters/dateToYear.d.ts +5 -3
  85. package/dist/dates/adapters/dateToYear.js +3 -2
  86. package/dist/dates/adapters/hmsToDate.d.ts +5 -4
  87. package/dist/dates/adapters/hmsToDate.js +3 -3
  88. package/dist/dates/adapters/mdyDateToDate.d.ts +5 -4
  89. package/dist/dates/adapters/mdyDateToDate.js +3 -3
  90. package/dist/dates/adapters/monthYearToDate.d.ts +5 -4
  91. package/dist/dates/adapters/monthYearToDate.js +3 -3
  92. package/dist/dates/adapters/numericOffsetToISO.d.ts +1 -1
  93. package/dist/dates/adapters/numericOffsetToISO.js +1 -1
  94. package/dist/dates/adapters/quarterYearToDate.d.ts +5 -4
  95. package/dist/dates/adapters/quarterYearToDate.js +3 -3
  96. package/dist/dates/adapters/weekYearToDate.d.ts +5 -4
  97. package/dist/dates/adapters/weekYearToDate.js +3 -3
  98. package/dist/dates/adapters/yearToDate.d.ts +5 -4
  99. package/dist/dates/adapters/yearToDate.js +3 -3
  100. package/dist/dates/constants/ISO_8601_REGEX.d.ts +11 -0
  101. package/dist/dates/constants/ISO_8601_REGEX.js +12 -1
  102. package/dist/dates/helpers/areIncludedDateTokens.d.ts +3 -3
  103. package/dist/dates/helpers/areIncludedDateTokens.js +3 -3
  104. package/dist/dates/helpers/getDateByDateFormat.d.ts +6 -5
  105. package/dist/dates/helpers/getDateByDateFormat.js +4 -4
  106. package/dist/dates/helpers/getDateByTimezone.d.ts +4 -3
  107. package/dist/dates/helpers/getDateByTimezone.js +2 -2
  108. package/dist/dates/helpers/getDateByTimezoneOffset.d.ts +6 -3
  109. package/dist/dates/helpers/getDateByTimezoneOffset.js +3 -2
  110. package/dist/dates/helpers/getDateFormatByProperty.d.ts +2 -2
  111. package/dist/dates/helpers/getDateFormatByProperty.js +2 -2
  112. package/dist/dates/helpers/getDateFormatRegularExpressionInArray.d.ts +1 -1
  113. package/dist/dates/helpers/getDateFormatRegularExpressionInArray.js +1 -1
  114. package/dist/dates/helpers/getDefaultDateSettings.d.ts +2 -2
  115. package/dist/dates/helpers/getDefaultDateSettings.js +2 -2
  116. package/dist/dates/helpers/getFormattedDateByFormat.d.ts +6 -4
  117. package/dist/dates/helpers/getFormattedDateByFormat.js +4 -3
  118. package/dist/dates/helpers/getSeparatorByDateFormat.d.ts +1 -1
  119. package/dist/dates/helpers/getSeparatorByDateFormat.js +1 -1
  120. package/dist/dates/helpers/getTimezoneObject.d.ts +1 -1
  121. package/dist/dates/helpers/getTimezoneObject.js +4 -3
  122. package/dist/dates/helpers/getUTCFormatByOffset.d.ts +1 -0
  123. package/dist/dates/helpers/getUTCFormatByOffset.js +1 -0
  124. package/dist/dates/helpers/getWeek.d.ts +1 -1
  125. package/dist/dates/helpers/getWeek.js +1 -1
  126. package/dist/dates/helpers/isValidDateObject.d.ts +1 -1
  127. package/dist/dates/helpers/isValidDateObject.js +1 -1
  128. package/dist/dates/helpers/isValidISOOffset.d.ts +3 -2
  129. package/dist/dates/helpers/isValidISOOffset.js +3 -2
  130. package/dist/dates/helpers/isValidPotentialDate.d.ts +3 -2
  131. package/dist/dates/helpers/isValidPotentialDate.js +16 -1
  132. package/dist/dates/helpers/isValidTimezoneOffset.d.ts +1 -1
  133. package/dist/dates/helpers/isValidTimezoneOffset.js +15 -4
  134. package/dist/dates/helpers/validateDate.d.ts +3 -3
  135. package/dist/dates/helpers/validateDate.js +3 -3
  136. package/dist/dates/interfaces/IDate.d.ts +1 -0
  137. package/dist/dates/interfaces/IDate.js +1 -0
  138. package/dist/filters/helpers/common/getVerboseFilters.d.ts +1 -1
  139. package/dist/filters/helpers/common/getVerboseFilters.js +63 -26
  140. package/dist/filters/helpers/settings/getFilterSettings.js +1 -6
  141. package/dist/globalization/labels/index.d.ts +0 -1
  142. package/dist/globalization/labels/index.js +0 -1
  143. package/package.json +1 -1
  144. package/dist/cjs/globalization/labels/columns/I18N_COLUMN.d.ts +0 -2
  145. package/dist/cjs/globalization/labels/columns/I18N_COLUMN.js +0 -8
  146. package/dist/cjs/globalization/labels/columns/index.d.ts +0 -1
  147. package/dist/cjs/globalization/labels/columns/index.js +0 -17
  148. package/dist/globalization/labels/columns/I18N_COLUMN.d.ts +0 -2
  149. package/dist/globalization/labels/columns/I18N_COLUMN.js +0 -5
  150. package/dist/globalization/labels/columns/index.d.ts +0 -1
  151. package/dist/globalization/labels/columns/index.js +0 -1
@@ -1,7 +1,9 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateSettings } from "../interfaces/IDateSettings";
2
3
  /**
3
4
  * Transform a Date to [Month Year] date format.
4
- * @param date String, object or millisencond number of the date
5
- * @returns string of [Month Year] date format
5
+ * @param {IDate} date String, object or millisencond number of the date
6
+ * @param {IDateSettings} settings the configuration of dates
7
+ * @returns {string} string of [Month Year] date format
6
8
  */
7
- export declare function dateToMonthYear(date: string | Date | number, settings?: IDateSettings): string;
9
+ export declare function dateToMonthYear(date: IDate, settings?: IDateSettings): string;
@@ -5,8 +5,9 @@ import { isValidDateObject } from "../helpers/isValidDateObject";
5
5
  import { isValidPotentialDate } from "../helpers/isValidPotentialDate";
6
6
  /**
7
7
  * Transform a Date to [Month Year] date format.
8
- * @param date String, object or millisencond number of the date
9
- * @returns string of [Month Year] date format
8
+ * @param {IDate} date String, object or millisencond number of the date
9
+ * @param {IDateSettings} settings the configuration of dates
10
+ * @returns {string} string of [Month Year] date format
10
11
  */
11
12
  export function dateToMonthYear(date, settings) {
12
13
  if (!isValidPotentialDate(date))
@@ -1,7 +1,9 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateSettings } from "../interfaces/IDateSettings";
2
3
  /**
3
4
  * Transform a valid Date to [Quarter Year] date format.
4
- * @param date String of a valid date, date object or millisencond number of the date
5
- * @returns string of [Quarter Year] date format
5
+ * @param {IDate} date String of a valid date, date object or millisencond number of the date
6
+ * @param {IDateSettings} settings the configuration of dates
7
+ * @returns {string} string of [Quarter Year] date format
6
8
  */
7
- export declare function dateToQuarterYear(date: string | Date | number, settings?: IDateSettings): string;
9
+ export declare function dateToQuarterYear(date: IDate, settings?: IDateSettings): string;
@@ -5,8 +5,9 @@ import { isValidDateObject } from "../helpers/isValidDateObject";
5
5
  import { isValidPotentialDate } from "../helpers/isValidPotentialDate";
6
6
  /**
7
7
  * Transform a valid Date to [Quarter Year] date format.
8
- * @param date String of a valid date, date object or millisencond number of the date
9
- * @returns string of [Quarter Year] date format
8
+ * @param {IDate} date String of a valid date, date object or millisencond number of the date
9
+ * @param {IDateSettings} settings the configuration of dates
10
+ * @returns {string} string of [Quarter Year] date format
10
11
  */
11
12
  export function dateToQuarterYear(date, settings) {
12
13
  if (!isValidPotentialDate(date))
@@ -1,7 +1,9 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateSettings } from "../interfaces/IDateSettings";
2
3
  /**
3
4
  * Transform a Date to [W# Year] date format.
4
- * @param date String, object or millisencond number of the date
5
- * @returns string of [W# Year] date format
5
+ * @param {IDate} date String, object or millisencond number of the date
6
+ * @param {IDateSettings} settings the configuration of dates
7
+ * @returns {string} string of [W# Year] date format
6
8
  */
7
- export declare function dateToWeekYear(date: string | Date | number, settings?: IDateSettings): string;
9
+ export declare function dateToWeekYear(date: IDate, settings?: IDateSettings): string;
@@ -5,8 +5,9 @@ import { isValidDateObject } from "../helpers/isValidDateObject";
5
5
  import { isValidPotentialDate } from "../helpers/isValidPotentialDate";
6
6
  /**
7
7
  * Transform a Date to [W# Year] date format.
8
- * @param date String, object or millisencond number of the date
9
- * @returns string of [W# Year] date format
8
+ * @param {IDate} date String, object or millisencond number of the date
9
+ * @param {IDateSettings} settings the configuration of dates
10
+ * @returns {string} string of [W# Year] date format
10
11
  */
11
12
  export function dateToWeekYear(date, settings) {
12
13
  if (!isValidPotentialDate(date))
@@ -1,7 +1,9 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateSettings } from "../interfaces/IDateSettings";
2
3
  /**
3
4
  * Transform a Date to [Year] date format.
4
- * @param {string | Date | number} date String, object or millisencond number of the date
5
- * @returns string of [Year] date format
5
+ * @param {IDate} date String, object or millisencond number of the date
6
+ * @param {IDateSettings} settings the configuration of dates
7
+ * @returns {string} string of [Year] date format
6
8
  */
7
- export declare function dateToYear(date: string | Date | number, settings?: IDateSettings): string;
9
+ export declare function dateToYear(date: IDate, settings?: IDateSettings): string;
@@ -4,8 +4,9 @@ import { isValidDateObject } from "../helpers/isValidDateObject";
4
4
  import { isValidPotentialDate } from "../helpers/isValidPotentialDate";
5
5
  /**
6
6
  * Transform a Date to [Year] date format.
7
- * @param {string | Date | number} date String, object or millisencond number of the date
8
- * @returns string of [Year] date format
7
+ * @param {IDate} date String, object or millisencond number of the date
8
+ * @param {IDateSettings} settings the configuration of dates
9
+ * @returns {string} string of [Year] date format
9
10
  */
10
11
  export function dateToYear(date, settings) {
11
12
  if (!isValidPotentialDate(date))
@@ -1,8 +1,9 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateSettings } from "../interfaces/IDateSettings";
2
3
  /**
3
4
  * Transforms String time from a [H:m:s] format to Date object.
4
- * @param monthYearDate String of [H:m:s] time
5
- * @param time Flag to parse the object date to milliseconds.
6
- * @returns The date object or the date in milliseconds. If the argument is an unexpected time, the function will return the same value
5
+ * @param {string} monthYearDate String of [H:m:s] time
6
+ * @param {IDateSettings} settings the configuration of dates
7
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected time, the function will return the same value
7
8
  */
8
- export declare function hmsToDate(hmsDate: string, settings?: IDateSettings): string | Date | number;
9
+ export declare function hmsToDate(hmsDate: string, settings?: IDateSettings): IDate;
@@ -6,9 +6,9 @@ import { getDefaultDateSettings } from "../helpers/getDefaultDateSettings";
6
6
  import { validateDate } from "../helpers/validateDate";
7
7
  /**
8
8
  * Transforms String time from a [H:m:s] format to Date object.
9
- * @param monthYearDate String of [H:m:s] time
10
- * @param time Flag to parse the object date to milliseconds.
11
- * @returns The date object or the date in milliseconds. If the argument is an unexpected time, the function will return the same value
9
+ * @param {string} monthYearDate String of [H:m:s] time
10
+ * @param {IDateSettings} settings the configuration of dates
11
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected time, the function will return the same value
12
12
  */
13
13
  export function hmsToDate(hmsDate, settings) {
14
14
  if (isEmpty(hmsDate) ||
@@ -1,8 +1,9 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateSettings } from "../interfaces/IDateSettings";
2
3
  /**
3
4
  * Transforms String Date from a [mm/dd/yyyy] format to Date object.
4
- * @param monthYearDate String of [mm/dd/yyyy] date
5
- * @param time Flag to parse the object date to milliseconds.
6
- * @returns The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value
5
+ * @param {string}monthYearDate String of [mm/dd/yyyy] date
6
+ * @param {IDateSettings} settings the configuration of dates
7
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value
7
8
  */
8
- export declare function mdyDateToDate(date: string, settings?: IDateSettings): string | Date | number;
9
+ export declare function mdyDateToDate(date: string, settings?: IDateSettings): IDate;
@@ -6,9 +6,9 @@ import { getDefaultDateSettings } from "../helpers/getDefaultDateSettings";
6
6
  import { validateDate } from "../helpers/validateDate";
7
7
  /**
8
8
  * Transforms String Date from a [mm/dd/yyyy] format to Date object.
9
- * @param monthYearDate String of [mm/dd/yyyy] date
10
- * @param time Flag to parse the object date to milliseconds.
11
- * @returns The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value
9
+ * @param {string}monthYearDate String of [mm/dd/yyyy] date
10
+ * @param {IDateSettings} settings the configuration of dates
11
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value
12
12
  */
13
13
  export function mdyDateToDate(date, settings) {
14
14
  if (isEmpty(date) ||
@@ -1,8 +1,9 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateSettings } from "../interfaces/IDateSettings";
2
3
  /**
3
4
  * Transforms String Date from a [Month Year] format to Date object.
4
- * @param monthYearDate String of [Month Year] date
5
- * @param time Flag to parse the object date to milliseconds.
6
- * @returns The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value
5
+ * @param {string} monthYearDate String of [Month Year] date
6
+ * @param {IDateSettings} settings the configuration of dates
7
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value
7
8
  */
8
- export declare function monthYearToDate(monthYearDate: string, settings?: IDateSettings): string | Date | number;
9
+ export declare function monthYearToDate(monthYearDate: string, settings?: IDateSettings): IDate;
@@ -7,9 +7,9 @@ import { getDefaultDateSettings } from "../helpers/getDefaultDateSettings";
7
7
  import { validateDate } from "../helpers/validateDate";
8
8
  /**
9
9
  * Transforms String Date from a [Month Year] format to Date object.
10
- * @param monthYearDate String of [Month Year] date
11
- * @param time Flag to parse the object date to milliseconds.
12
- * @returns The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value
10
+ * @param {string} monthYearDate String of [Month Year] date
11
+ * @param {IDateSettings} settings the configuration of dates
12
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value
13
13
  */
14
14
  export function monthYearToDate(monthYearDate, settings) {
15
15
  if (isEmpty(monthYearDate) ||
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Gets the ISO offset From the numeric offset (minutes)
3
- * @param {number} offset the timezone offset
3
+ * @param {number | string} offset the timezone offset
4
4
  * @returns {string} the offset in minutes
5
5
  */
6
6
  export declare function numericOffsetToISO(offset: number | string, leadZeros?: boolean): string;
@@ -5,7 +5,7 @@ import { isValidISOOffset } from "../helpers/isValidISOOffset";
5
5
  import { ISOToNumericOffset } from "./ISOToNumericOffset";
6
6
  /**
7
7
  * Gets the ISO offset From the numeric offset (minutes)
8
- * @param {number} offset the timezone offset
8
+ * @param {number | string} offset the timezone offset
9
9
  * @returns {string} the offset in minutes
10
10
  */
11
11
  export function numericOffsetToISO(offset, leadZeros = true) {
@@ -1,8 +1,9 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateSettings } from "../interfaces/IDateSettings";
2
3
  /**
3
4
  * Transforms String Date from a [Quarter Year] format to Date object.
4
- * @param quarterYearDate String of [Quarter Year] date
5
- * @param time Flag to parse the object date to milliseconds.
6
- * @returns The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
5
+ * @param {string} quarterYearDate String of [Quarter Year] date
6
+ * @param {IDateSettings} settings the configuration of dates
7
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
7
8
  */
8
- export declare function quarterYearToDate(quarterYearDate: string, settings?: IDateSettings): string | Date | number;
9
+ export declare function quarterYearToDate(quarterYearDate: string, settings?: IDateSettings): IDate;
@@ -7,9 +7,9 @@ import { getDefaultDateSettings } from "../helpers/getDefaultDateSettings";
7
7
  import { validateDate } from "../helpers/validateDate";
8
8
  /**
9
9
  * Transforms String Date from a [Quarter Year] format to Date object.
10
- * @param quarterYearDate String of [Quarter Year] date
11
- * @param time Flag to parse the object date to milliseconds.
12
- * @returns The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
10
+ * @param {string} quarterYearDate String of [Quarter Year] date
11
+ * @param {IDateSettings} settings the configuration of dates
12
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
13
13
  */
14
14
  export function quarterYearToDate(quarterYearDate, settings) {
15
15
  if (isEmpty(quarterYearDate) ||
@@ -1,8 +1,9 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateSettings } from "../interfaces/IDateSettings";
2
3
  /**
3
4
  * Transforms String Date from a [Week Year] format to Date object.
4
- * @param date String of [Week Year] date
5
- * @param time Flag to parse the object date to milliseconds.
6
- * @returns The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
5
+ * @param {string} date String of [Week Year] date
6
+ * @param {IDateSettings} settings the configuration of dates
7
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
7
8
  */
8
- export declare function weekYearToDate(weekYear: string, settings?: IDateSettings): string | Date | number;
9
+ export declare function weekYearToDate(weekYear: string, settings?: IDateSettings): IDate;
@@ -7,9 +7,9 @@ import { getWeek } from "../helpers/getWeek";
7
7
  import { validateDate } from "../helpers/validateDate";
8
8
  /**
9
9
  * Transforms String Date from a [Week Year] format to Date object.
10
- * @param date String of [Week Year] date
11
- * @param time Flag to parse the object date to milliseconds.
12
- * @returns The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
10
+ * @param {string} date String of [Week Year] date
11
+ * @param {IDateSettings} settings the configuration of dates
12
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
13
13
  */
14
14
  export function weekYearToDate(weekYear, settings) {
15
15
  if (isEmpty(weekYear) ||
@@ -1,8 +1,9 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateSettings } from "../interfaces/IDateSettings";
2
3
  /**
3
4
  * Transforms String Date from a [Year] format to Date object.
4
- * @param yearDate String of [Year] date
5
- * @param time Flag to parse the object date to milliseconds.
6
- * @returns The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
5
+ * @param {string} yearDate String of [Year] date
6
+ * @param {IDateSettings} settings the configuration of dates
7
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
7
8
  */
8
- export declare function yearToDate(yearDate: string, settings?: IDateSettings): string | Date | number;
9
+ export declare function yearToDate(yearDate: string, settings?: IDateSettings): IDate;
@@ -6,9 +6,9 @@ import { getDefaultDateSettings } from "../helpers/getDefaultDateSettings";
6
6
  import { validateDate } from "../helpers/validateDate";
7
7
  /**
8
8
  * Transforms String Date from a [Year] format to Date object.
9
- * @param yearDate String of [Year] date
10
- * @param time Flag to parse the object date to milliseconds.
11
- * @returns The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
9
+ * @param {string} yearDate String of [Year] date
10
+ * @param {IDateSettings} settings the configuration of dates
11
+ * @returns {IDate} The date object or the date in milliseconds. If the argument is an unexpected date, the function will return the same value.
12
12
  */
13
13
  export function yearToDate(yearDate, settings) {
14
14
  if (isEmpty(yearDate) ||
@@ -1 +1,12 @@
1
+ /**
2
+ * @example -12:00
3
+ * @example -01:00
4
+ * @example 00:00
5
+ * @example +00:00
6
+ * @example -00:00
7
+ * @example +05:00
8
+ * @example +12:00
9
+ * @example +13:59
10
+ * @example +14:00
11
+ */
1
12
  export declare const ISO_8601_REGEX: RegExp;
@@ -1 +1,12 @@
1
- export const ISO_8601_REGEX = /^[+-]?\d{2}:\d{2}$/;
1
+ /**
2
+ * @example -12:00
3
+ * @example -01:00
4
+ * @example 00:00
5
+ * @example +00:00
6
+ * @example -00:00
7
+ * @example +05:00
8
+ * @example +12:00
9
+ * @example +13:59
10
+ * @example +14:00
11
+ */
12
+ export const ISO_8601_REGEX = /^(-(0[0-9]|1[0-2]):[0-5][0-9]|[+]?(0[0-9]|1[0-3]):[0-5][0-9]|\+14:00)?$/;
@@ -2,8 +2,8 @@ import { IDateFormat } from "../interfaces/IDateFormat";
2
2
  /**
3
3
  * Determines if the given date has tokens. The date is splitted depending on date format.
4
4
  * Undefined date is returning false.
5
- * @param date The string of the date. It may contain tokens.
6
- * @param format The date format
7
- * @returns true: include tokens; false: otherwise
5
+ * @param {string }date The string of the date. It may contain tokens.
6
+ * @param {IDateFormat} format The date format
7
+ * @returns {boolean} true: include tokens; false: otherwise
8
8
  */
9
9
  export declare function areIncludedDateTokens(date: string, format?: IDateFormat): boolean;
@@ -5,9 +5,9 @@ import { getSeparatorByDateFormat } from "./getSeparatorByDateFormat";
5
5
  /**
6
6
  * Determines if the given date has tokens. The date is splitted depending on date format.
7
7
  * Undefined date is returning false.
8
- * @param date The string of the date. It may contain tokens.
9
- * @param format The date format
10
- * @returns true: include tokens; false: otherwise
8
+ * @param {string }date The string of the date. It may contain tokens.
9
+ * @param {IDateFormat} format The date format
10
+ * @returns {boolean} true: include tokens; false: otherwise
11
11
  */
12
12
  export function areIncludedDateTokens(date, format = DATE_FORMAT.DAY) {
13
13
  let hasTokens = false;
@@ -1,10 +1,11 @@
1
1
  import { IDateFormat } from "../interfaces/IDateFormat";
2
2
  import { IDateSettings } from "../interfaces/IDateSettings";
3
+ import { IDate } from "../interfaces/IDate";
3
4
  /**
4
5
  * Gets a Date Object instance by a Date format
5
- * @param date String with a formatted date
6
- * @param format The date format
7
- * @param time flag to convert the formatted date to miliseconds
8
- * @returns a Date object, milisecond time or the same value if date format does not match.
6
+ * @param {string} date String with a formatted date
7
+ * @param {IDateFormat} format The date format
8
+ * @param {IDateSettings} settings the configuration of dates
9
+ * @returns {IDate} a Date object, milisecond time or the same value if date format does not match.
9
10
  */
10
- export declare function getDateByDateFormat(date: string, format: IDateFormat, settings?: IDateSettings): string | Date | number;
11
+ export declare function getDateByDateFormat(date: string, format: IDateFormat, settings?: IDateSettings): IDate;
@@ -6,10 +6,10 @@ import { weekYearToDate } from "../adapters/weekYearToDate";
6
6
  import { mdyDateToDate } from "../adapters/mdyDateToDate";
7
7
  /**
8
8
  * Gets a Date Object instance by a Date format
9
- * @param date String with a formatted date
10
- * @param format The date format
11
- * @param time flag to convert the formatted date to miliseconds
12
- * @returns a Date object, milisecond time or the same value if date format does not match.
9
+ * @param {string} date String with a formatted date
10
+ * @param {IDateFormat} format The date format
11
+ * @param {IDateSettings} settings the configuration of dates
12
+ * @returns {IDate} a Date object, milisecond time or the same value if date format does not match.
13
13
  */
14
14
  export function getDateByDateFormat(date, format, settings) {
15
15
  switch (format) {
@@ -1,8 +1,9 @@
1
1
  import { IDTimezone } from "../interfaces/IDTimezone";
2
+ import { IDate } from "../interfaces/IDate";
2
3
  /**
3
4
  * Gets a date value in the given timezone
4
- * @param {string} date the date
5
+ * @param {IDate} date the date
5
6
  * @param {IDTimezone} timezone the timezone object
6
- * @returns {string} A transformed value
7
+ * @returns {IDate} A transformed value
7
8
  */
8
- export declare function getDateByTimezone(date: string | number | Date, timezone: IDTimezone): string | number | Date;
9
+ export declare function getDateByTimezone(date: IDate, timezone: IDTimezone): IDate;
@@ -6,9 +6,9 @@ import { isValidPotentialDate } from "./isValidPotentialDate";
6
6
  import { validateDate } from "./validateDate";
7
7
  /**
8
8
  * Gets a date value in the given timezone
9
- * @param {string} date the date
9
+ * @param {IDate} date the date
10
10
  * @param {IDTimezone} timezone the timezone object
11
- * @returns {string} A transformed value
11
+ * @returns {IDate} A transformed value
12
12
  */
13
13
  export function getDateByTimezone(date, timezone) {
14
14
  const defaultTimezone = getTimezoneObject(timezone);
@@ -1,7 +1,10 @@
1
+ import { IDTimezoneOffset } from "../interfaces/IDTimezoneOffset";
2
+ import { IDate } from "../interfaces/IDate";
1
3
  /**
2
4
  * Gets a Date with the given offset of the Timezone.
3
5
  * No given an offset the default is going to be set by the browser
4
- * @param date String, object or millisencond number of the date
5
- * @returns updated Date object
6
+ * @param {IDate} date String, object or millisencond number of the date
7
+ * @param {IDTimezoneOffset} offset the timezone offset
8
+ * @returns {IDate} the updated Date object
6
9
  */
7
- export declare function getDateByTimezoneOffset(date: string | Date | number, offset?: number | string): string | Date | number;
10
+ export declare function getDateByTimezoneOffset(date: IDate, offset?: IDTimezoneOffset): IDate;
@@ -6,8 +6,9 @@ import { validateDate } from "./validateDate";
6
6
  /**
7
7
  * Gets a Date with the given offset of the Timezone.
8
8
  * No given an offset the default is going to be set by the browser
9
- * @param date String, object or millisencond number of the date
10
- * @returns updated Date object
9
+ * @param {IDate} date String, object or millisencond number of the date
10
+ * @param {IDTimezoneOffset} offset the timezone offset
11
+ * @returns {IDate} the updated Date object
11
12
  */
12
13
  export function getDateByTimezoneOffset(date, offset) {
13
14
  if (!isValidPotentialDate(date) ||
@@ -2,7 +2,7 @@ import { IColumnPropertyType } from "../../columns/interfaces/IColumnPropertyTyp
2
2
  import { IDateFormat } from "../interfaces/IDateFormat";
3
3
  /**
4
4
  * Gets the date format by the given property
5
- * @param property The Column Property
6
- * @returns The date format
5
+ * @param {IColumnPropertyType} property The Column Property
6
+ * @returns {IDateFormat} The date format
7
7
  */
8
8
  export declare function getDateFormatByProperty(property: IColumnPropertyType): IDateFormat;
@@ -1,8 +1,8 @@
1
1
  import { DATE_FORMAT_BY_PROPERTY } from "../constants/DATE_FORMAT_BY_PROPERTY";
2
2
  /**
3
3
  * Gets the date format by the given property
4
- * @param property The Column Property
5
- * @returns The date format
4
+ * @param {IColumnPropertyType} property The Column Property
5
+ * @returns {IDateFormat} The date format
6
6
  */
7
7
  export function getDateFormatByProperty(property) {
8
8
  return DATE_FORMAT_BY_PROPERTY[property];
@@ -3,6 +3,6 @@ import { IDateFormat } from "../interfaces/IDateFormat";
3
3
  * Gets an array of regular expressions by the given date format.
4
4
  * Day format is the default date format
5
5
  * @param {IDateFormat} dateFormat an string of the format
6
- * @returns an array of regular expressions
6
+ * @returns {string[]} an array of regular expressions
7
7
  */
8
8
  export declare function getDateFormatRegularExpressionInArray(dateFormat?: IDateFormat): string[];
@@ -5,7 +5,7 @@ import { DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT } from "../constants/DATE_REGUL
5
5
  * Gets an array of regular expressions by the given date format.
6
6
  * Day format is the default date format
7
7
  * @param {IDateFormat} dateFormat an string of the format
8
- * @returns an array of regular expressions
8
+ * @returns {string[]} an array of regular expressions
9
9
  */
10
10
  export function getDateFormatRegularExpressionInArray(dateFormat = DATE_FORMAT.DAY) {
11
11
  const defaultRegularExpression = DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT[DATE_FORMAT.DAY];
@@ -1,7 +1,7 @@
1
1
  import { IDateSettings } from "../interfaces/IDateSettings";
2
2
  /**
3
3
  * Gets the default properties for Date Settings object
4
- * @param settings the date settings
5
- * @returns a new object with the date settings.
4
+ * @param {IDateSettings} settings the configuration of dates
5
+ * @returns {IDateSettings} a new object with the date settings.
6
6
  */
7
7
  export declare function getDefaultDateSettings(settings: IDateSettings): IDateSettings;
@@ -1,8 +1,8 @@
1
1
  import { getTimezoneObject } from "./getTimezoneObject";
2
2
  /**
3
3
  * Gets the default properties for Date Settings object
4
- * @param settings the date settings
5
- * @returns a new object with the date settings.
4
+ * @param {IDateSettings} settings the configuration of dates
5
+ * @returns {IDateSettings} a new object with the date settings.
6
6
  */
7
7
  export function getDefaultDateSettings(settings) {
8
8
  var _a;
@@ -1,10 +1,12 @@
1
+ import { IDate } from "../interfaces/IDate";
1
2
  import { IDateFormat } from "../interfaces/IDateFormat";
2
3
  import { IDateSettings } from "../interfaces/IDateSettings";
3
4
  /**
4
5
  * A Date object, string or millisecond number are gotten in order to convert it in an formatted string date
5
6
  * - Some strings are valid
6
- * @param date String with a formatted date
7
- * @param format The date format
8
- * @returns a formmatted date or the same value if format does not match
7
+ * @param {IDate} date String with a formatted date
8
+ * @param {IDateFormat} format The date format
9
+ * @param {IDateSettings} settings the configuration of dates
10
+ * @returns {IDate} a formmatted date or the same value if format does not match
9
11
  */
10
- export declare function getFormattedDateByFormat(date: string | Date | number, format: IDateFormat, settings?: IDateSettings): string | Date | number;
12
+ export declare function getFormattedDateByFormat(date: IDate, format: IDateFormat, settings?: IDateSettings): IDate;
@@ -7,9 +7,10 @@ import { DATE_FORMAT } from "../constants/DATE_FORMAT";
7
7
  /**
8
8
  * A Date object, string or millisecond number are gotten in order to convert it in an formatted string date
9
9
  * - Some strings are valid
10
- * @param date String with a formatted date
11
- * @param format The date format
12
- * @returns a formmatted date or the same value if format does not match
10
+ * @param {IDate} date String with a formatted date
11
+ * @param {IDateFormat} format The date format
12
+ * @param {IDateSettings} settings the configuration of dates
13
+ * @returns {IDate} a formmatted date or the same value if format does not match
13
14
  */
14
15
  export function getFormattedDateByFormat(date, format, settings) {
15
16
  switch (format) {
@@ -2,6 +2,6 @@ import { IDateFormat } from "../interfaces/IDateFormat";
2
2
  /**
3
3
  * Gets the separator of the date format
4
4
  * @param {IDateFormat} format the date format
5
- * @returns a separator string
5
+ * @returns {string} a separator string
6
6
  */
7
7
  export declare function getSeparatorByDateFormat(format?: IDateFormat): string;
@@ -2,7 +2,7 @@ import { DATE_FORMAT } from "../constants/DATE_FORMAT";
2
2
  /**
3
3
  * Gets the separator of the date format
4
4
  * @param {IDateFormat} format the date format
5
- * @returns a separator string
5
+ * @returns {string} a separator string
6
6
  */
7
7
  export function getSeparatorByDateFormat(format = DATE_FORMAT.DAY) {
8
8
  return format === DATE_FORMAT.DAY ? "/" : " ";
@@ -6,6 +6,6 @@ import { IDTimezone } from "../interfaces/IDTimezone";
6
6
  * - In any case, the offset is prioritized to override other properties.
7
7
  * @param {IDTimezone} timezone the timezone object
8
8
  * @param {IModel | IDataset} model the info of the dataset (model)
9
- * @returns a new timezone object
9
+ * @returns {IDTimezone} a new timezone object
10
10
  */
11
11
  export declare function getTimezoneObject(timezone: IDTimezone, model?: IModel | IDataset): IDTimezone;
@@ -10,7 +10,7 @@ import { isValidTimezoneOffset } from "./isValidTimezoneOffset";
10
10
  * - In any case, the offset is prioritized to override other properties.
11
11
  * @param {IDTimezone} timezone the timezone object
12
12
  * @param {IModel | IDataset} model the info of the dataset (model)
13
- * @returns a new timezone object
13
+ * @returns {IDTimezone} a new timezone object
14
14
  */
15
15
  export function getTimezoneObject(timezone, model) {
16
16
  const offset = getOffset(timezone, model);
@@ -64,8 +64,9 @@ function getType(timezone, model, offset) {
64
64
  if (!isEmpty(timezone === null || timezone === void 0 ? void 0 : timezone.type)) {
65
65
  type = timezone.type;
66
66
  }
67
- else if (!isEmpty(timezone === null || timezone === void 0 ? void 0 : timezone.offset)) {
68
- type = getTypeByOffset(timezone === null || timezone === void 0 ? void 0 : timezone.offset);
67
+ else if (!isEmpty(timezone === null || timezone === void 0 ? void 0 : timezone.offset) &&
68
+ isValidTimezoneOffset(timezone.offset)) {
69
+ type = getTypeByOffset(timezone.offset);
69
70
  }
70
71
  else if (!isEmpty((_a = model === null || model === void 0 ? void 0 : model.timezone) === null || _a === void 0 ? void 0 : _a.type)) {
71
72
  type = model.timezone.type;
@@ -2,6 +2,7 @@ import { IDTimezone } from "../interfaces/IDTimezone";
2
2
  /**
3
3
  * Gets the UTC format dependeing on the given offset
4
4
  * @param {IDTimezone} timezone the timezone object
5
+ * @param {boolean} minified Flag to reduce the Zeros
5
6
  * @returns {string} an string with the UTC format
6
7
  */
7
8
  export declare function getUTCFormatByOffset(timezone: IDTimezone, minified?: boolean): string;