Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  parse-from-tostring-methods.js   Sprache: JAVA

 
// SKIP test262 export
// Behavior is not currently specified.

let dates = [
    "0217-09-23""+000217-09-23""-000217-09-23",
    "2017-09-23""+002017-09-23""-002017-09-23",
                  "+022017-09-23""-022017-09-23",
                  "+202017-09-23""-202017-09-23",
];

for (let date of dates) {
    let d = new Date(date);
    let timeValue = d.valueOf();

    assertEq(Number.isNaN(timeValue), false, `Cannot parse "${date}" as ISO date-only form`);

    // Ensure parsing the results of toString(), toUTCString(), and toISOString()
    // gives the same time value as required by 20.3.3.2 Date.parse.
    //
    // Additional requirement not present in ES2019 draft rev 7acacc524213058a2368b5fa751fac7ea08ba230:
    // The time zone offset must not contain seconds (or milliseconds) for |Date.parse(x.toString())|
    // to be equal to |x.valueOf()|.
    let tz = d.getTimezoneOffset();
    if (Math.trunc(tz) === tz) {
        assertEq(Date.parse(d.toString()), timeValue, `Cannot parse from toString() of "${date}"`);
    }
    assertEq(Date.parse(d.toUTCString()), timeValue, `Cannot parse from toUTCString() of "${date}"`);
    assertEq(Date.parse(d.toISOString()), timeValue, `Cannot parse from toISOString() of "${date}"`);
}

if (typeof reportCompare === "function")
    reportCompare(truetrue);

Messung V0.5
C=90 H=73 G=81

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge