LearnBoost/mongoose — Issue #756: Date type returns date-1 (date minus one day)
Author: isenbeqiri
Created: 2012-03-01 16:13:26+00:00
State: open

I have the User Schema and the following instance
user = new UsersCollection({
email: "i.beqiri@gmail.com",
title: "Mr.",
first_name: "Chuck",
last_name: "Norris",
birthday: "26 August 1983"
});

The date type works perfectly when casting from any input format. The only problem was that the saved date would be moved to one day earlier.

Did not have time to investigate deeper. The solution I made was to change /lib/schema/date.js line 62 to

if (date.toString() != 'Invalid Date')
return date+1;