DATES – Age Computation from Birth and Date Headers
Status: Current
Purpose
Reimplements CLAN’s dates command, which computes the age of each participant at the time of transcription by subtracting @Birth dates from the file-level @Date header. Computed ages are inserted as @Comment: Age of CHI is Y;M.D headers after the @ID/@Birth block.
See the CLAN manual for the original command documentation.
The computed age uses CHAT format: years;months.days (e.g., 2;6.15 for two years, six months, and fifteen days).
Usage
chatter clan dates file.cha
Options
This command has no configurable options.
Behavior
- Collects the
@Dateheader value and all@Birthheaders with their participant codes. - Computes each participant’s age by subtracting the birth date from the file date.
- Inserts
@Comment: Age of <PARTICIPANT> is <age>headers into the file. - If no
@Dateheader is present, the file is left unchanged.
Differences from CLAN
- Operates on AST rather than raw text.
- Uses the framework transform pipeline (parse -> transform -> serialize -> write).