This article is from the Calendars FAQ, by Claus Tondering email@example.com with numerous contributions by others.
That is the wrong question to ask. The correct question to ask is: When
does a Hebrew year begin? Once you have answered that question (see
section 3.6), the length of the year is the number of days between
1 Tishri in one year and 1 Tishri in the following year.