## calculateAge() function

Calculates the age in years from the birth date.

**Signature:**

```typescript
export declare function calculateAge(birthDateStr: string, endDateStr?: string): {
    years: number;
    months: number;
    days: number;
};
```

## Parameters

| Parameter       | Type   | Description                                                                 |
|------------------|--------|-----------------------------------------------------------------------------|
| birthDateStr     | string | The birth date or start date in ISO-8601 format YYYY-MM-DD.               |
| endDateStr       | string | _(Optional)_ Optional end date in ISO-8601 format YYYY-MM-DD. Default is today. |

**Returns:**

{ years: number; months: number; days: number; }

The age in years, months, and days.

- [calculateAge() function](/content/docs/sdk/core.calculateage#calculateage-function/index.html)
- [Parameters](/content/docs/sdk/core.calculateage#parameters/index.html)
