I have got a task to make simple counter (it's not so simple in facts). Anyway, I can't use any plugins but jQuery.
I get an actual dateTime using
now = new Date();
I have a problem, because if I try to code
var now = new Date();
I get this error in chrome:
Uncaught ReferenceError: now is not defined
at <anonymous>:2:1
at Object.InjectedScript._evaluateOn (<anonymous>:905:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:838:34)
at Object.InjectedScript.evaluate (<anonymous>:694:21)
The output of now = Date();
is Mon Aug 31 2015 18:40:06 GMT+0200 (Stredoeurópsky čas (letný))
, what is little problem, because I need to get format YYYY-MM-DD HH:ii:ss
Is that possible using jQuery without any plugins?
Thank you a million