npm add soonerorlater
import { parse } from "soonerorlater";
parse('Every Wednesday');
/*
{
repeats: 'weekly',
weekdays: new Set(['wednesday'])
}
*/
parse('Mondays and Thursdays at 9:30am to 10:30am');
/*
{
repeats: 'weekly',
weekdays: new Set(['monday', 'thursday']),
startTime: { hours: 9, minutes: 30 },
endTime: { hours: 10, minutes: 30 }
}
*/
- Uses the library parcook for parsing.
- TODO: support standard representations as result