forked from akai/readest
feat(rsvp): split words option, faster countdown, and skip pages RSVP cant open (#3755)
* fix: use string-parsed year to avoid UTC/timezone boundary issues * feat: Add option to split words in RSVP mode * fix: change the checkbox to a toggle * fix(rsvp): speed up countdown from 2.4s to 1.5s * feat(rsvp): skip to next page when no readable text is found * fix(rsvp): replace lookbehind regex with lookahead-only split in getHyphenParts
This commit is contained in:
@@ -90,7 +90,7 @@ export const validateAndNormalizeDate = (dateInput: string): ValidationResult<st
|
||||
}
|
||||
|
||||
// Check if year is reasonable (between 1000 and current year + 10)
|
||||
const year = date.getFullYear();
|
||||
const year = parseInt(cleaned.substring(0, 4));
|
||||
const currentYear = new Date().getFullYear();
|
||||
if (year < 1000 || year > currentYear + 10) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user