get day, month week from date in javascript code example Example: javascript get day var d = new Date(); var n = d.getDay();