¡GoConqr estrena diseño! Cuéntanos qué te parece.

Diagrama de flujo

The Date Object

Kostas Diakogiannis Web Developing Junior Certificate Inglés

Contenido del diagrama

  1. JavaScript Date Object

  2. The Date Object

    The Date object is a native object that is being provided to us by JavaScript in order to perform any operations that deal with dates. Booking applications for hotels, flights or events deal with the date object to provide their exmperience/

    In order to start working with dates you need to create a new date object. This is done by the date constructor.

    let today = new Date(); //Beware if no parameters are passed to the constructor then the date is the exact date of now, the date that the script executed itself and especially this line.

    You can also pass a specified date by passing either arguments inside the Date constructor or a string. For all the possible ways to create a new date please reference the links below:

    Create date object possible methods.

    Create date objects by passing a human readable string.

    In order to access information from a date object you must use one of the native date 'getter' methods like:

    console.log(today.getFullYear()) // this returns 2018 as a number.

    See all getter functions for retrieving information from a date object here!

    In order to change a specific part of a date object we use a list of functions that are provided to us, the so called 'setter' date functions.

    let todayNextMonth = new Date();

    todayNextMonth.setMonth(today.getMonth() + 1); // this will set the month onto the next month from today. Today is 15th October, this will set the date to 15th Nov 2018.

    Check full docs for setter functions and how to change specific piece of info here!

    c

    /

Información

Descripción
Junior Certificate Web Developing Diagrama sobre The Date Object, creado por Kostas Diakogiannis el 15/10/2018.
Visitas
2
Historial
  • Creado por Kostas Diakogiannis · 12 oct 2018
  • Copiado por Kostas Diakogiannis · 12 oct 2018
  • Copiado por Kostas Diakogiannis · 12 oct 2018
  • Copiado por Kostas Diakogiannis · 15 oct 2018
  • Copiado por Kostas Diakogiannis · 15 oct 2018
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?