0

I have problems with getting new Date(); to work properly in a mobile app (Cordova/Phonegap). Some suggested that iPhones and Androids requires specific format other then the one used by default by Javascript, like this one: mm/dd/yyyy hh:mm:ss.

Thing is, my app needs to receive from the client its current time (now) and then send it to the server. How can I make new Date(); so it comes out with mm/dd/yyyy hh:mm:ss format? As I see Date() can't accept a format as argument.

Blo
  • 11,903
  • 5
  • 45
  • 99
Maboo
  • 425
  • 1
  • 9
  • 18
  • 1
    Why not using an external library to do that? Like http://momentjs.com/ – elTomato Jan 20 '16 at 22:45
  • @el_tomato because it seems like a very small task and it worked great on regular web browser. But I see momentjs has a meteor package, I'll check it out, looks interesting and useful, thanks! – Maboo Jan 20 '16 at 22:49

0 Answers0