minor changes
This commit is contained in:
parent
ecd84770dd
commit
43558a55a3
1 changed files with 6 additions and 6 deletions
|
@ -465,7 +465,7 @@ Ox.formatDateRangeDuration = function(start, end, utc) {
|
||||||
/*@
|
/*@
|
||||||
Ox.formatDegrees <f> Formats degrees as D°MM'SS"
|
Ox.formatDegrees <f> Formats degrees as D°MM'SS"
|
||||||
> Ox.formatDegrees(-111.11, 'lng')
|
> Ox.formatDegrees(-111.11, 'lng')
|
||||||
"111\u00B006'36\"W"
|
"111°06'36\"W"
|
||||||
@*/
|
@*/
|
||||||
Ox.formatDegrees = function(degrees, mode) {
|
Ox.formatDegrees = function(degrees, mode) {
|
||||||
var days = 0,
|
var days = 0,
|
||||||
|
@ -477,7 +477,7 @@ Ox.formatDegrees = function(degrees, mode) {
|
||||||
}
|
}
|
||||||
array[0] = days * 24 + parseInt(array[0], 10);
|
array[0] = days * 24 + parseInt(array[0], 10);
|
||||||
return (!mode ? sign : '')
|
return (!mode ? sign : '')
|
||||||
+ array[0] + '\u00B0' + array[1] + "'" + array[2] + '"'
|
+ array[0] + '°' + array[1] + "'" + array[2] + '"'
|
||||||
+ (
|
+ (
|
||||||
mode == 'lat' ? (degrees < 0 ? 'S' : 'N')
|
mode == 'lat' ? (degrees < 0 ? 'S' : 'N')
|
||||||
: mode == 'lng' ? (degrees < 0 ? 'W' : 'E')
|
: mode == 'lng' ? (degrees < 0 ? 'W' : 'E')
|
||||||
|
@ -608,13 +608,13 @@ Ox.formatOrdinal <f> Formats a number as an ordinal
|
||||||
Ox.formatOrdinal = function(number) {
|
Ox.formatOrdinal = function(number) {
|
||||||
var string = number.toString(),
|
var string = number.toString(),
|
||||||
length = string.length,
|
length = string.length,
|
||||||
end = string[length - 1],
|
last = string[length - 1],
|
||||||
ten = length > 1 && string[length - 2] == '1';
|
ten = length > 1 && string[length - 2] == '1';
|
||||||
if (end == '1' && !ten) {
|
if (last == '1' && !ten) {
|
||||||
string += 'st';
|
string += 'st';
|
||||||
} else if (end == '2' && !ten) {
|
} else if (last == '2' && !ten) {
|
||||||
string += 'nd';
|
string += 'nd';
|
||||||
} else if (end == '3' && !ten) {
|
} else if (last == '3' && !ten) {
|
||||||
string += 'rd';
|
string += 'rd';
|
||||||
} else {
|
} else {
|
||||||
string += 'th';
|
string += 'th';
|
||||||
|
|
Loading…
Reference in a new issue