Created
October 3, 2014 11:11
-
-
Save oshanz/a485ec6614ec7db452ff to your computer and use it in GitHub Desktop.
Sort Mysql Months
This file contains 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
'use strict'; | |
var _ = require('underscore'); | |
function sortMonths(months) { | |
return _.intersection(['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], months); | |
} | |
console.log(sortMonths(['March', 'January'])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment