Skip to content

Commit

Permalink
Fix parse method of DateIO
Browse files Browse the repository at this point in the history
  • Loading branch information
siposdani87 authored and dsipos committed Apr 20, 2024
1 parent aa1f8c0 commit 0dc1b8b
Show file tree
Hide file tree
Showing 13 changed files with 431 additions and 395 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## 1.0.0 - TBD
# Changelog

*
All notable changes to this project will be documented in this file.

## 1.0.0 - 2024-04-20

* Fix parse method of DateIO
* Upgrade packages

## 0.9.17 - 2024-03-22

Expand Down
44 changes: 22 additions & 22 deletions coverage/lcov.info
Original file line number Diff line number Diff line change
Expand Up @@ -668,22 +668,22 @@ DA:336,126
DA:341,4
DA:342,4
DA:343,4
DA:344,23
DA:345,23
DA:348,23
DA:349,23
DA:344,19
DA:345,19
DA:348,19
DA:349,19
DA:354,4
DA:355,4
DA:356,121
DA:357,121
DA:360,121
DA:361,121
DA:356,120
DA:357,120
DA:360,120
DA:361,120
DA:366,4
DA:367,4
DA:368,24
DA:369,24
DA:372,24
DA:373,24
DA:368,29
DA:369,29
DA:372,29
DA:373,29
DA:378,0
DA:379,0
DA:381,0
Expand Down Expand Up @@ -11181,8 +11181,8 @@ FNF:33
FNH:18
FNDA:30,(anonymous_0)
FNDA:2,(anonymous_1)
FNDA:844,(anonymous_2)
FNDA:11,(anonymous_3)
FNDA:846,(anonymous_2)
FNDA:13,(anonymous_3)
FNDA:848,(anonymous_4)
FNDA:0,(anonymous_5)
FNDA:0,(anonymous_6)
Expand Down Expand Up @@ -11223,15 +11223,15 @@ DA:49,28
DA:51,28
DA:52,2
DA:55,28
DA:56,844
DA:56,846
DA:59,28
DA:64,11
DA:65,0
DA:66,0
DA:64,13
DA:65,2
DA:66,2
DA:72,0
DA:79,11
DA:80,11
DA:82,1
DA:82,0
DA:90,848
DA:91,843
DA:95,5
Expand Down Expand Up @@ -11264,15 +11264,15 @@ DA:173,8
DA:176,0
DA:179,0
LF:51
LH:32
LH:33
BRDA:39,0,0,1
BRDA:39,0,1,29
BRDA:39,0,2,0
BRDA:61,1,0,0
BRDA:64,2,0,0
BRDA:64,2,0,2
BRDA:90,3,0,843
BRF:6
BRH:3
BRH:4
end_of_record
TN:
SF:src/utils/index.ts
Expand Down
2 changes: 1 addition & 1 deletion coverage/stylelint.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sui.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/sui.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/utils/dateio.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export declare const setDateIOLocale: (newLocale: string) => void;
export declare const convertToISOFormat: (formatString: string) => string;
export declare const DateIO: {
parse: (dateString?: string, formatString?: string) => Date;
parse: (dateString?: number | string, formatString?: string) => Date;
format: (date: Date, formatString?: string) => string;
isBefore: (date: Date, dateToCompare: Date) => boolean;
isAfter: (date: Date, dateToCompare: Date) => boolean;
Expand Down
4 changes: 2 additions & 2 deletions dist/utils/dateio.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const DateIO = {
parse: (dateString = new Date().toISOString(), formatString) => {
if (formatString) {
try {
return parse(dateString, convertToISOFormat(formatString), new Date());
return parse(dateString.toString(), convertToISOFormat(formatString), new Date());
}
catch (error) {
console.error('parse', {
Expand All @@ -32,7 +32,7 @@ export const DateIO = {
}
}
try {
return parseISO(dateString);
return parseISO(dateString.toString());
}
catch (error) {
console.error('parseISO', {
Expand Down
2 changes: 1 addition & 1 deletion dist/utils/operation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export declare const pluckKeys: (obj: Object, condition: (value: any, key: strin
export declare const scrollTo: (x: number, y: number, opt_duration?: number | undefined, opt_step?: number | undefined) => void;
export declare const scrollToElement: (selector: string, opt_duration?: number | undefined, opt_step?: number | undefined) => void;
export declare const scrollIntoView: (selector: string, opt_behavior?: ScrollBehavior | undefined) => void;
export declare const debounce: (func: (ev: Event) => void, opt_wait?: number | undefined, opt_immediate?: boolean | undefined) => (this: Window, ev: Event) => void;
export declare const debounce: (func: (ev: Event) => void, opt_wait?: number | undefined, opt_immediate?: boolean | undefined) => ((this: Window, ev: Event) => void);
export declare const urlWithQueryString: (url: string, opt_params?: Object | undefined) => string;
export declare const getQueryString: (opt_params?: Object) => string;
export declare const getExtensionName: (url: string) => string;
Expand Down
Loading

0 comments on commit 0dc1b8b

Please sign in to comment.