When did the Japanese new year start?

Since 1873, the Japanese New Year has been according to the Gregorian calendar. New Years Day is January 1. However, it used to follow the Lunar New Year which varies from year to year around the end of January.