Bladeren bron

Fixed subsecond intervals in interval_to_seconds

Rashid Khan 12 jaren geleden
bovenliggende
commit
85fd491b13
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      js/shared.js

+ 1 - 1
js/shared.js

@@ -192,7 +192,7 @@
 
 
   // histogram & trends
   // histogram & trends
   kbn.interval_to_seconds = function(string) {
   kbn.interval_to_seconds = function(string) {
-    var matches = string.match(/(\d+)([Mwdhmsy])/);
+    var matches = string.match(/(\d+(?:\.\d+)?)([Mwdhmsy])/);
     switch (matches[2]) {
     switch (matches[2]) {
     case 'y': 
     case 'y': 
       return matches[1]*31536000;
       return matches[1]*31536000;