chore: Review fix

This commit is contained in:
iamsivin
2026-02-23 22:42:56 +05:30
parent cca473a27e
commit ac060b9cb2
4 changed files with 20 additions and 5 deletions
@@ -266,10 +266,14 @@ const matchRelativeDay = (text, now) => {
const dayAtTimeMatch = text.match(RELATIVE_DAY_AT_TIME_RE);
if (dayAtTimeMatch) {
const time = parseTimeString(dayAtTimeMatch[2]);
const [, dayKey, timeRaw] = dayAtTimeMatch;
const bare = /^(tonight|tonite)$/.test(dayKey) && !/[ap]m/i.test(timeRaw);
const time = bare
? inferHoursFromTOD('tonight', ...timeRaw.split(':'))
: parseTimeString(timeRaw);
if (!time) return null;
return applyTimeWithRollover(
RELATIVE_DAY_MAP[dayAtTimeMatch[1]],
RELATIVE_DAY_MAP[dayKey],
time.hours,
time.minutes,
now