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
document.observe("dom:loaded", function() { | |
var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; | |
var dateEl = $('project_expiry_date_3i'); | |
var monthEl = $('project_expiry_date_2i'); | |
var yearEl = $('project_expiry_date_1i'); | |
if (dateEl && monthEl && yearEl) { | |
var currentDateIndex = dateEl.selectedIndex; | |
function leapYearAdjustedDays() { | |
var daysInMonth = DAYS_IN_MONTH[monthEl.selectedIndex]; | |
// Leap year calc. |
NewerOlder