---
title: Years
version: 1.6.0
signature: |
  moment.duration().years();
  moment.duration().asYears();
---


As with the other getters for durations, `moment.duration().years()` gets the years.

`moment.duration().asYears()` gets the length of the duration in years.

**Note:** The length of a duration in years is defined as 365 days.

---
title: Years
version: 1.6.0
signature: |
  moment.duration().years();
  moment.duration().asYears();
---


As with the other getters for durations, `moment.duration().years()` gets the years.

`moment.duration().asYears()` gets the length of the duration in years.

Remove statement that 1 year = 365 days.
Remove statement that 1 year = 365 days.