Commits

David Chambers committed a8dd6a5

Removed date and time localization from base template (see https://bitbucket.org/davidchambers/jquery.localize for a saner approach).

Comments (0)

Files changed (1)

templates/_base.dhtml

 			});
 
 		}());
-	</script>
-	<script type="text/javascript">
-		(function () {
-			function ordinal(n) {
-				if (10 < n && n < 14) return n + 'th';
-				switch (n % 10) {
-					case 1: return n + 'st';
-					case 2: return n + 'nd';
-					case 3: return n + 'rd';
-					default: return n + 'th';
-				}
-			}
-			function pad(n) {
-				return n < 10 ? '0' + n : n;
-			}
-			function timezone(date) {
-				var offset = -date.getTimezoneOffset();
-				return (offset > 0 ? '+' : '-') + pad(Math.abs(offset / 60)) + ':' + pad(Math.abs(offset % 60));
-			}
-			if (document.getElementsByTagName) {
-				var elements = document.getElementsByTagName('time'),
-					i = elements.length,
-					months = 'January February March April May June July August September October November December'.split(' '),
-					re = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::\d{2})?(?:[-+]00:00|Z)$/,
-					date, element, m;
-
-				while (i--) {
-					element = elements[i];
-					m = (element.getAttribute('datetime') || '').match(re);
-					if (m) {
-						date = new Date([m[3], months[m[2]-1].substr(0, 3), m[1], m[4] + ':' + m[5], 'GMT'].join(' '));
-						element.setAttribute('datetime', [date.getFullYear(), pad(date.getMonth() + 1), pad(date.getDate())].join('-') +
-								'T' + [pad(date.getHours()), pad(date.getMinutes()), pad(date.getSeconds())].join(':') + timezone(date));
-						element.innerHTML = {% block time_innerhtml %}element.childNodes.length == 1 ? [date.getDate(), months[date.getMonth()], date.getFullYear()].join(' ') :
-								'<span>' + [date.getDate(), months[date.getMonth()], date.getFullYear()].join(' ') + '</span><span>' +
-								(date.getHours() % 12 || 12) + '.' + pad(date.getMinutes()) + '\u2009' + (date.getHours() < 12 ? 'am' : 'pm') + '</span>'{% endblock %};
-					}
-				}
-			}
-		}());
 	</script>{% if request|internal %}
 	<script type="text/javascript">
 		(function () {