Created
July 24, 2011 19:06
-
-
Save thejefflarson/1102949 to your computer and use it in GitHub Desktop.
24 hour hack.
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
$(".TS-year_notch_year_text").each(function(){ | |
var el = $(this); | |
var text = el.text(); | |
text = text.replace(/(\d?\d:\d\d) ((a\.m\.|p\.m\.))/, function(date, time, ampm){ | |
var hourMinute = _.map(time.split(":"), function(it){ return parseInt(it, 10); }); | |
if(ampm === "p.m.") { | |
hourMinute[0] = hourMinute[0] + 12; | |
} else if(ampm === "a.m." && hourMinute[0] === 12) hourMinute[0] = 0; | |
return hourMinute.join("."); | |
}); | |
el.text(text); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment