Przejdź do treści

call - Kurs HTML i CSS

  • JS
    Operacje na datach - Date.prototype / Lokalizacja daty - toLocaleDateString

    ...Date.prototype.toLocaleDateString new Date(1410, 6, 15).toLocaleDateString(); // np.: "15 lipiec 1410" Date.prototype.toLocaleDateString.call(null); // TypeError Date.prototype.toLocaleDateString.call(undefined); // TypeError Date.prototype.toLocaleDateString.call(0); // TypeError Date.prototype.toLocaleDateString.call(""); // TypeError Date.prototype.toLocaleDateString.call("2000"); // TypeError Date.prototype.toLocaleDateString.call({}); // TypeError

  • JS
    Operacje na datach - Date.prototype / Pobieranie milisekund - valueOf

    ...samo jak Date.prototype.getTime. Przykład Date.prototype.valueOf new Date(2000, 0, 1).valueOf(); // 946681200000 Date.prototype.valueOf.call(null); // TypeError Date.prototype.valueOf.call(undefined); // TypeError Date.prototype.valueOf.call(0); // TypeError Date.prototype.valueOf.call(""); // TypeError Date.prototype.valueOf.call("2000"); // TypeError Date.prototype.valueOf.call({}); // TypeError

  • JS
    Operacje na datach - Date.prototype / Pobieranie czasu - getTime

    ...samo jak Date.prototype.valueOf. Przykład Date.prototype.getTime new Date(2000, 0, 1).getTime(); // 946681200000 Date.prototype.getTime.call(null); // TypeError Date.prototype.getTime.call(undefined); // TypeError Date.prototype.getTime.call(0); // TypeError Date.prototype.getTime.call(""); // TypeError Date.prototype.getTime.call("2000"); // TypeError Date.prototype.getTime.call({}); // TypeError

  • JS
    Operacje na datach - Date.prototype / Pobieranie roku - getFullYear

    ...new Date("1410-07-15T13:30+02:00").getFullYear(); // 1410 new Date(NaN).getFullYear(); // NaN Date.prototype.getFullYear.call(null); // TypeError Date.prototype.getFullYear.call(undefined); // TypeError Date.prototype.getFullYear.call(0); // TypeError Date.prototype.getFullYear.call(""); // TypeError Date.prototype.getFullYear.call("2000"); // TypeError Date.prototype.getFullYear.call({}); // TypeError

  • JS
    Operacje na datach - Date.prototype / Pobieranie roku w UTC - getUTCFullYear

    ...Date("1410-07-15T13:30+02:00").getUTCFullYear(); // 1410 new Date(NaN).getUTCFullYear(); // NaN Date.prototype.getUTCFullYear.call(null); // TypeError Date.prototype.getUTCFullYear.call(undefined); // TypeError Date.prototype.getUTCFullYear.call(0); // TypeError Date.prototype.getUTCFullYear.call(""); // TypeError Date.prototype.getUTCFullYear.call("2000"); // TypeError Date.prototype.getUTCFullYear.call({})...

  • JS
    Operacje na datach - Date.prototype / Pobieranie miesiąca - getMonth

    ...new Date("1410-07-15T13:30+02:00").getMonth(); // 6 (lipiec) new Date(NaN).getMonth(); // NaN Date.prototype.getMonth.call(null); // TypeError Date.prototype.getMonth.call(undefined); // TypeError Date.prototype.getMonth.call(0); // TypeError Date.prototype.getMonth.call(""); // TypeError Date.prototype.getMonth.call("2000"); // TypeError Date.prototype.getMonth.call({}); // TypeError

  • JS
    Operacje na datach - Date.prototype / Pobieranie miesiąca w UTC - getUTCMonth

    ...Date("1410-07-15T13:30+02:00").getUTCMonth(); // 6 (lipiec) new Date(NaN).getUTCMonth(); // NaN Date.prototype.getUTCMonth.call(null); // TypeError Date.prototype.getUTCMonth.call(undefined); // TypeError Date.prototype.getUTCMonth.call(0); // TypeError Date.prototype.getUTCMonth.call(""); // TypeError Date.prototype.getUTCMonth.call("2000"); // TypeError Date.prototype.getUTCMonth.call({}); // TypeError

  • JS
    Operacje na datach - Date.prototype / Pobieranie dnia miesiąca - getDate

    ...new Date("1410-07-15T13:30+02:00").getDate(); // 15 new Date(NaN).getDate(); // NaN Date.prototype.getDate.call(null); // TypeError Date.prototype.getDate.call(undefined); // TypeError Date.prototype.getDate.call(0); // TypeError Date.prototype.getDate.call(""); // TypeError Date.prototype.getDate.call("2000"); // TypeError Date.prototype.getDate.call({}); // TypeError

  • JS
    Operacje na datach - Date.prototype / Pobieranie dnia miesiąca w UTC - getUTCDate

    ...new Date("1410-07-15T13:30+02:00").getUTCDate(); // 15 new Date(NaN).getUTCDate(); // NaN Date.prototype.getUTCDate.call(null); // TypeError Date.prototype.getUTCDate.call(undefined); // TypeError Date.prototype.getUTCDate.call(0); // TypeError Date.prototype.getUTCDate.call(""); // TypeError Date.prototype.getUTCDate.call("2000"); // TypeError Date.prototype.getUTCDate.call({}); // TypeError

  • JS
    Operacje na datach - Date.prototype / Pobieranie dnia tygodnia - getDay

    ...new Date("1410-07-15T13:30+02:00").getDay(); // 0 (niedziela) new Date(NaN).getDay(); // NaN Date.prototype.getDay.call(null); // TypeError Date.prototype.getDay.call(undefined); // TypeError Date.prototype.getDay.call(0); // TypeError Date.prototype.getDay.call(""); // TypeError Date.prototype.getDay.call("2000"); // TypeError Date.prototype.getDay.call({}); // TypeError

« 1 2 3 4 5 6 »

★★★★★ 5/5 (289)

Facebook