Javascript Date Methods

Date plays an important role in tracking moments when an event has occurred.

new Date() returns a Date object with current date and time(Ex: Sat Aug 05 2023 13:13:26 GMT+0530 (India Standard Time)).

Javascript allows Date manipulation with different methods.

const d = new Date("2023-03-02");//Date is 2023-03-02

const d = new Date();//

Months in a year are represented with numbers(Jan-0,Feb-1,Mar-2,Apr-3,May-4,Jun-5,Jul-6,Aug-7,Sep-8,Oct-9,Nov-10,Dec-11)

Days in a week are represented with numbers(Sun-0,Mon-1,Tue-2,Wed-3,Thu-4,Fri-5,Sat-6)


Popular posts from this blog

Java Script Array Methods

Computer Science Basics