@wilm-ai/wilma-client 0.0.3 → 0.0.4
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/dist/parsers/dates.js +6 -0
- package/package.json +1 -1
package/dist/parsers/dates.js
CHANGED
|
@@ -13,6 +13,12 @@ export function parseWilmaTimestamp(value) {
|
|
|
13
13
|
return parsed;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
// Try YYYY-MM-DD HH:MM format (e.g., "2026-02-05 14:00")
|
|
17
|
+
const isoLikeMatch = /^(\d{4})-(\d{2})-(\d{2})\s+(\d{1,2}):(\d{2})$/.exec(raw);
|
|
18
|
+
if (isoLikeMatch) {
|
|
19
|
+
const [, y, m, d, h, mi] = isoLikeMatch.map(Number);
|
|
20
|
+
return new Date(y, m - 1, d, h, mi, 0, 0);
|
|
21
|
+
}
|
|
16
22
|
// Try Unix timestamp as string
|
|
17
23
|
if (/^\d{10,13}$/.test(raw)) {
|
|
18
24
|
const num = Number(raw);
|