@link-assistant/hive-mind 1.50.14 → 1.50.15
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/solve.validation.lib.mjs +3 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -371,10 +371,12 @@ export const parseUrlComponents = issueUrl => {
|
|
|
371
371
|
export const parseResetTime = timeStr => {
|
|
372
372
|
// Normalize and parse time formats like:
|
|
373
373
|
// "5:30am", "11:45pm", "12:16 PM", "07:05 Am", "5am", "5 AM"
|
|
374
|
+
// Also accepts date+time forms like "Apr 17, 4:00 AM" and ignores the date portion.
|
|
374
375
|
const normalized = (timeStr || '').toString().trim();
|
|
376
|
+
const timePortion = normalized.replace(/^(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:t(?:ember)?)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\s+\d{1,2},\s+/i, '');
|
|
375
377
|
|
|
376
378
|
// Accept both HH:MM am/pm and HH am/pm
|
|
377
|
-
let match =
|
|
379
|
+
let match = timePortion.match(/^(\d{1,2})(?::(\d{2}))?\s*([ap]m)$/i);
|
|
378
380
|
if (!match) {
|
|
379
381
|
throw new Error(`Invalid time format: ${timeStr}`);
|
|
380
382
|
}
|