firstMonthOfYear

A function that returns a Date object of the first month in a year.

firstMonthOfYear(new Date(2017, 11, 1)); // 2017-1-1
firstMonthOfYear(new Date(2017, 0, 1)); // 2017-1-1

Parameters

value Date

Returns

Date - The first month in a year.

 /