Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Kapitel 9. Datumsoperationen > Wie kann ich ein Datumsobjekt mit dem aktuellen ...

178. Wie kann ich ein Datumsobjekt mit dem aktuellen Systemdatum erzeugen?

Die einfachste Variante zur Erzeugung eines Datumsobjekts verwendet den Konstruktor Date() ohne Parameter (der so genannte leere oder parameterlose Konstruktor). Mit diesem wird ein – das aktuelle Systemdatum als Wert enthaltendes – Objekt erzeugt. Die Syntax sieht so aus:

Listing 522. Erzeugung eines Datumsobjekts mit dem aktuellen Systemdatum

new Date();


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial