Age Category Codes
Age category codes may appear on an attribute of a category, which can appear in event and drawDefinition elements within a tournament record.
See ITF Standard Codes for an explanation of the construction of age category codes.
A consideredDate is required for calculating ageMaxDate and ageMinDate, values which can be used to validate a participant entry into an event.
import { getCategoryAgeDetails } from 'tods-competition-factory';
const { ageMax, ageMin, ageMaxDate, ageMinDate } = getCategoryAgeDetails({
category: { ageCategoryCode },
consideredDate, // required - typically the startDate or endDate of a tournament
});
Live Editor
Result
Loading...