To get the primary day of a year, use the Date()
builder to make a date object, passing it a decision to the getFullYear()
technique for the year, zero for the month, and one for the day as parameters. The Date object can contain the primary day of the year.
new Date(2023, 0, 1);
The only thing here is to remember that months are zero-based and go from 0 is January and 11 is December.