Selectable dates¶
The NepaliSelectableDates predicate used to constrain which dates a UI or validation
layer accepts. The before_, after_, and date_range factories live on
NepaliDateConverter.
Predicate over a date that consumers use to enable or disable individual days and years.
Useful for validating whether a date is allowed by some rule: a range, a weekend, a
day the institution is closed. The converter factories
(NepaliDateConverter.before_date_selectable and the like), the event helpers and
NepaliCalendarPolicy.as_selectable_dates all produce instances of this type.
- class NepaliSelectableDates[source]¶
Bases:
objectBase predicate. Both methods default to allowing everything.
Subclass and override, or use the converter and event factories, which return ready-made instances.