fix to sort with seconds

Sorting with format dd.mm.YYYY HH:mm:ss has been added
pull/290/head
Grex 8 years ago committed by GitHub
parent 865d1f627c
commit d013737d26

@ -29,7 +29,11 @@
var deDatea = jQuery.trim(a).split(' ');
var deTimea = deDatea[1].split(':');
var deDatea2 = deDatea[0].split('.');
if(typeof deTimea[2] != 'undefined') {
x = (deDatea2[2] + deDatea2[1] + deDatea2[0] + deTimea[0] + deTimea[1] + deTimea[2]) * 1;
} else {
x = (deDatea2[2] + deDatea2[1] + deDatea2[0] + deTimea[0] + deTimea[1]) * 1;
}
} else {
x = Infinity; // = l'an 1000 ...
}
@ -38,7 +42,11 @@
var deDateb = jQuery.trim(b).split(' ');
var deTimeb = deDateb[1].split(':');
deDateb = deDateb[0].split('.');
if(typeof deTimeb[2] != 'undefined') {
y = (deDateb[2] + deDateb[1] + deDateb[0] + deTimeb[0] + deTimeb[1] + deTimeb[2]) * 1;
} else {
y = (deDateb[2] + deDateb[1] + deDateb[0] + deTimeb[0] + deTimeb[1]) * 1;
}
} else {
y = Infinity;
}
@ -52,7 +60,11 @@
var deDatea = jQuery.trim(a).split(' ');
var deTimea = deDatea[1].split(':');
var deDatea2 = deDatea[0].split('.');
if(typeof deTimea[2] != 'undefined') {
x = (deDatea2[2] + deDatea2[1] + deDatea2[0] + deTimea[0] + deTimea[1] + deTimea[2]) * 1;
} else {
x = (deDatea2[2] + deDatea2[1] + deDatea2[0] + deTimea[0] + deTimea[1]) * 1;
}
} else {
x = Infinity;
}
@ -61,7 +73,11 @@
var deDateb = jQuery.trim(b).split(' ');
var deTimeb = deDateb[1].split(':');
deDateb = deDateb[0].split('.');
if(typeof deTimeb[2] != 'undefined') {
y = (deDateb[2] + deDateb[1] + deDateb[0] + deTimeb[0] + deTimeb[1] + deTimeb[2]) * 1;
} else {
y = (deDateb[2] + deDateb[1] + deDateb[0] + deTimeb[0] + deTimeb[1]) * 1;
}
} else {
y = Infinity;
}
@ -107,4 +123,3 @@
return z;
}
} );

Loading…
Cancel
Save