Re:Ask HN: Why isn't there a `setDay` method on the Date pro...
by CyberFonic on Monday September 19, 2016 @12:28AM
(#12528908)
See my comment above. What interpretation would you prefer? setDay changes the date into the future or past by changing the date, the month or the year. At a minimum there are 6 possible values. To me none of them are an obvious choice.
[ Parent
| on HN ]
Re:Ask HN: Why isn't there a `setDay` method on the Date pro...
by saghm on Monday September 19, 2016 @08:32PM
(#12535983)
Given that `setMinute` sets the minute in the same hour and `setHour` sets the hour in the same day, I'd think `setDay` setting to the day in the same week would be rather logical