@evolis/evolis-library 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/EvoDate.js +1 -1
- package/README.md +3 -3
- package/package.json +1 -1
package/EvoDate.js
CHANGED
@@ -52,7 +52,7 @@ function toDate(d) {
|
|
52
52
|
d.constructor === Array ? new Date(d[0],d[1],d[2]) :
|
53
53
|
d.constructor === Number ? new Date(d) :
|
54
54
|
d.constructor === String ? new Date(d) :
|
55
|
-
typeof d === "object" ? new Date(d.year, d.month, (d.date
|
55
|
+
typeof d === "object" ? new Date(d.year, d.month, (d.date || d.day), d.hours, d.minutes, d.seconds) :
|
56
56
|
NaN
|
57
57
|
);
|
58
58
|
}
|
package/README.md
CHANGED
@@ -40,9 +40,9 @@ Import it into your script using:
|
|
40
40
|
- **isDate(value: any)**
|
41
41
|
- value: The value to test
|
42
42
|
- *return: true if the value is a valid date*
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
- **isMySQLDate(value: any)**
|
44
|
+
- value: The value to test
|
45
|
+
- *return: true if the value is a string with the valid MySQL date format (yyyy-mm-dd)*
|
46
46
|
- ### Converters
|
47
47
|
- **toDate(d: any)**
|
48
48
|
- s: The thing to convert
|