@trudb/tru-common-lib 0.0.299 → 0.0.300
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/esm2020/lib/services/tru-util.mjs +10 -1
- package/fesm2015/trudb-tru-common-lib.mjs +9 -0
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +9 -0
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/services/tru-util.d.ts +1 -0
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ import * as i1$4 from '@angular/material/select';
|
|
|
24
24
|
import { MatSelectModule } from '@angular/material/select';
|
|
25
25
|
import * as i5 from '@angular/material/core';
|
|
26
26
|
import { MatOptionModule } from '@angular/material/core';
|
|
27
|
+
import moment$1 from 'moment';
|
|
27
28
|
import { MatButtonModule } from '@angular/material/button';
|
|
28
29
|
import { MatInputModule } from '@angular/material/input';
|
|
29
30
|
import * as i1$5 from '@angular/platform-browser';
|
|
@@ -1681,6 +1682,14 @@ class TruUtil {
|
|
|
1681
1682
|
}
|
|
1682
1683
|
return null;
|
|
1683
1684
|
};
|
|
1685
|
+
this.strIsDate = (date, format = undefined) => {
|
|
1686
|
+
if (moment$1(date, format || "MM/DD/YYYY", true).isValid()) {
|
|
1687
|
+
return true;
|
|
1688
|
+
}
|
|
1689
|
+
else {
|
|
1690
|
+
return false;
|
|
1691
|
+
}
|
|
1692
|
+
};
|
|
1684
1693
|
}
|
|
1685
1694
|
tryParseBool(value, defaultValue) {
|
|
1686
1695
|
return (value == 'true' || value == 'false' || value === true || value === false) && JSON.parse(value) || defaultValue;
|