From 43558a55a305cb35be6a8d046b4c8a59dcb42300 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 2 Jun 2012 17:00:44 +0200 Subject: [PATCH] minor changes --- source/Ox/js/Format.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/Ox/js/Format.js b/source/Ox/js/Format.js index e068a108..7ff639a5 100644 --- a/source/Ox/js/Format.js +++ b/source/Ox/js/Format.js @@ -465,7 +465,7 @@ Ox.formatDateRangeDuration = function(start, end, utc) { /*@ Ox.formatDegrees Formats degrees as D°MM'SS" > Ox.formatDegrees(-111.11, 'lng') - "111\u00B006'36\"W" + "111°06'36\"W" @*/ Ox.formatDegrees = function(degrees, mode) { var days = 0, @@ -477,7 +477,7 @@ Ox.formatDegrees = function(degrees, mode) { } array[0] = days * 24 + parseInt(array[0], 10); return (!mode ? sign : '') - + array[0] + '\u00B0' + array[1] + "'" + array[2] + '"' + + array[0] + '°' + array[1] + "'" + array[2] + '"' + ( mode == 'lat' ? (degrees < 0 ? 'S' : 'N') : mode == 'lng' ? (degrees < 0 ? 'W' : 'E') @@ -608,13 +608,13 @@ Ox.formatOrdinal Formats a number as an ordinal Ox.formatOrdinal = function(number) { var string = number.toString(), length = string.length, - end = string[length - 1], + last = string[length - 1], ten = length > 1 && string[length - 2] == '1'; - if (end == '1' && !ten) { + if (last == '1' && !ten) { string += 'st'; - } else if (end == '2' && !ten) { + } else if (last == '2' && !ten) { string += 'nd'; - } else if (end == '3' && !ten) { + } else if (last == '3' && !ten) { string += 'rd'; } else { string += 'th';