getDaysInYear

Modified on Tue, 22 Aug 2023

Description

Use this function to get the number of days in a year of the given date.

Syntax

getDaysInYear(date)

Returns

Return ValueDescription
NumberReturns the number of days in the year of the given date.

Sample

ExampleResultDescription
getDaysInYear(2023-04-08)365Returns the number of days in the year, which is 365, for the given date (assuming it's not a leap year).

To view all the Date functions, click here.

See Also