فهرست منبع

Fixed subsecond intervals in interval_to_seconds

Rashid Khan 12 سال پیش
والد
کامیت
5dd1c55627
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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;