Last active
March 21, 2016 02:11
-
-
Save franklinjavier/581239399ccb9e45c596 to your computer and use it in GitHub Desktop.
Get birthdays of the month
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User | |
.find({ | |
birthdate: { $exists: true }, | |
$where: 'return this.birthdate.getMonth()+1 === 1' // january | |
}) | |
.exec(function(err, users) { | |
console.log(err, users); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment