Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 355 Bytes

dayOfYear.md

File metadata and controls

19 lines (12 loc) · 355 Bytes

Back to reference

dayOfYear(date)

Returns the number of days that have passed in the year of the given date.

Example:

const date = new Date("2021-05-17");

This will calculate the number of days between January 1st and the date given:

let days = gmynd.dayOfYear(date);

// returns: 137