@cnamts/vue-dot
Version:
Implementation of our Design System for the French Health Insurance
10 lines (7 loc) • 325 B
text/typescript
import { parseDate } from '../../../helpers/parseDate';
/** Check if a date is before another date (DD/MM/YYYY format) */
export function isDateBefore(minDate: string, value: string): boolean {
const parsedValue = parseDate(value);
const parsedMinDate = parseDate(minDate);
return parsedValue.isBefore(parsedMinDate);
}