“Wie man Tag vom JavaScript -Datum bekommt” Code-Antworten

Wie man Tag vom JavaScript -Datum bekommt

var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
var months = ['January','February','March','April','May','June','July','August','September','October','November','December'];

var day = days[ now.getDay() ];
var month = months[ now.getMonth() ];
Aryamitra Chaudhuri

JavaScript bekommen Tag

var d = new Date();
var n = d.toLocaleString("en-US", { "weekday": "long" }); // Monday
n += "\n" + d.toLocaleString("en-US", { "weekday": "short" }); // Mon
n += "\n" + d.toLocaleString("en-US", { "weekday": "narrow" }); // M
Web Surfer

Neues Date Getday JS

Date.getDay()
// Javascript date getDay() method returns the day of the week for the specified
// date according to local time. The value returned by getDay() is an integer 
// corresponding to the day of the week: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.
Repulsive Rhinoceros

Ähnliche Antworten wie “Wie man Tag vom JavaScript -Datum bekommt”

Fragen ähnlich wie “Wie man Tag vom JavaScript -Datum bekommt”

Weitere verwandte Antworten zu “Wie man Tag vom JavaScript -Datum bekommt” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen