Hacker News new | ask | show | jobs
by plugnburn 3740 days ago
In JS we can rely on the Date.getDay prototype. Here's the ES6 flavour:

  weekDay = (dateObj) => ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'][dateObj.getDay()]