0

Today's Date

How to get today's date using jQuery?

5th Jul 2017, 3:04 AM
JULIAN ANTHONY
JULIAN ANTHONY - avatar
7 Antworten
+ 3
JQuery use JS to run... when you write 'JQuery code' it's JS code usinf the JQuery library... So, everything you can do without JQuery, you can also do them with it :P
5th Jul 2017, 3:55 AM
visph
visph - avatar
+ 3
JQuery doc' wrote: << The $.now() method is a shorthand for the number returned by the expression (new Date).getTime(). >> http://api.jquery.com/jquery.now/ W3School wrote: << Return the number of milliseconds since 1970/01/01 >> https://www.w3schools.com/jsref/jsref_gettime.asp Same return too as Date.now(): https://www.w3schools.com/jsref/jsref_now.asp If you want another format, look at methods of Date object: https://www.w3schools.com/js/js_date_methods.asp
5th Jul 2017, 5:49 AM
visph
visph - avatar
+ 2
u can do it without jquery :< console.log(new Date())
5th Jul 2017, 3:11 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 1
Javascript should be preferable method, if you can do it in Javascript easily, like today = new Date();
5th Jul 2017, 5:14 AM
Calviղ
Calviղ - avatar
0
No need to use JQuery. Here's a jsfiddle example: http://jsfiddle.net/nCE9u/
5th Jul 2017, 3:14 AM
ChaoticDawg
ChaoticDawg - avatar
0
is it possible to do it with JQUERY ?
5th Jul 2017, 3:16 AM
JULIAN ANTHONY
JULIAN ANTHONY - avatar
0
I use var time = $ .now() but the result is not as I want
5th Jul 2017, 5:43 AM
JULIAN ANTHONY
JULIAN ANTHONY - avatar