I am making an events calender with dates and would like to add a class to the next upcoming date (the closest to the current date)
html
<div>
<div class=".date" id="9,18,2013">18th Sept 2013: Going Fishing</div>
<div class=".date" id="22,01,2014">22nd Jan 2014: Going on Holiday to Greece</div>
<div class=".date" id="16,02,2014">16th Feb 2014: Business Meeting</div>
<div class=".date" id="27,02,2014">27th Feb 2014: Sisters Birthday</div>
</div>
javascript/jquery
var today = new Date();
var a = $(".date").attr('id')
var b = a.split(",");
var c = new Date(b[2], b[0], b[1]);
this changes the id value as a date but i need to find the closest one to the variable "today"