Skip to content
Advertisement

Tag: java-8

invalid date printed

I am using moment from mongorc.js (reference: https://raw.githubusercontent.com/gabrielelana/mongodb-shell-extensions/master/released/mongorc.js) when executed this small snippet its printing “invalid date” But in Java: Prints Sun Nov 30 00:00:00 IST 2 Though may not be correct, I want not “Invalid date” to be printed. Where did I go wrong? Answer I have hard coded the date value and it worked:

Advertisement