⊗jstsPmIbDt 36 of 55 menu

Date in TypeScript

Let the variable store the date, which we will create using JavaScript via the new Date command.

It turns out that our variable will have the type Date:

let date: Date;

Let's write an object with a date containing the current moment in time into this variable:

let date: Date = new Date;

Now let's write an object with a date containing a given point in time:

let date: Date = new Date(2030, 11, 31);

Make a variable that will contain the date object.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline