Work with Dates in JavaScript

Offered By
Coursera Project Network
In this Guided Project, you will:

Describe how JavaScript dates are stored and displayed.

Extract components from a date object using JavaScript Date Get Methods.

Modify a JavaScript date object using Date Set Methods.

Clock2 hours
IntermediateIntermediate
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

By the end of this project, you will have learned to create and manipulate date objects in JavaScript. You will work with dates by using Date Get methods to isolate and use portions of a date—like month and year—and Date Set methods to set portions of a date to specific values. Since dates are often critical pieces of data, the ability to control them is an essential skill for any JavaScript programmer. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Skills you will develop

  • JS Date Get Methods
  • JS Date Set Methods
  • JS Date Strings
  • JS Date Formats
  • javascript syntax

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Demonstrate the three methods of creating a date object in JavaScript.

  2. Write the JavaScript code to use dates in a variety of formats including UTC and ISO strings.

  3. Use a JavaScript Get Method to extract the month from a date object and use an array to display the month name.

  4. Create a new date string by using Date Get Methods to extract components from the JavaScript date object and concatenating those components.

  5. Modify existing values in a date object using JavaScript Date Set Methods.

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.