News for hackers. Stuff that matters.
Re:Ask HN: Why isn't there a `setDay` method on the Date pro... by saghm on Sunday September 18, 2016 @10:24PM (#12528387)
I don't see how that would be any less hard to define than `setMonth` or `setHour`
Re:Ask HN: Why isn't there a `setDay` method on the Date pro... by perfmode on Monday September 19, 2016 @12:49AM (#12529013)
Set hour is easier because it has an obvious result. The date doesn't change.
Re:Ask HN: Why isn't there a `setDay` method on the Date pro... by saghm on Monday September 19, 2016 @08:35PM (#12535998)
So setting the day of the week would set to that day in the same week the date occurred; I don't think that's any weirder than calling `setMonth` to change the month on a date