@@ -581,37 +581,10 @@ function($, _, moment) {
581
581
}
582
582
} ;
583
583
584
- // Date and time
585
- kbn . toDateTime = function ( size , timeScale ) {
586
- var datetime ;
587
- if ( timeScale === 's' ) {
588
- datetime = moment . unix ( size ) ;
589
- } else {
590
- datetime = moment ( size ) ;
591
- }
592
- return datetime ;
593
- } ;
594
-
595
584
kbn . toDuration = function ( size , timeScale ) {
596
585
return moment . duration ( size , timeScale ) ;
597
586
} ;
598
587
599
- kbn . valueFormats . dtms = function ( size ) {
600
- return kbn . toDateTime ( size , 'ms' ) . format ( 'YYYY-MM-DD hh:mm:ss' ) ;
601
- } ;
602
-
603
- kbn . valueFormats . dts = function ( size ) {
604
- return kbn . toDateTime ( size , 's' ) . format ( 'YYYY-MM-DD hh:mm:ss' ) ;
605
- } ;
606
-
607
- kbn . valueFormats . dtfromnowms = function ( size ) {
608
- return kbn . toDateTime ( size , 'ms' ) . fromNow ( true ) ;
609
- } ;
610
-
611
- kbn . valueFormats . dtfromnows = function ( size ) {
612
- return kbn . toDateTime ( size , 's' ) . fromNow ( true ) ;
613
- } ;
614
-
615
588
kbn . valueFormats . dtdurationms = function ( size ) {
616
589
return kbn . toDuration ( size , 'ms' ) . humanize ( ) ;
617
590
} ;
@@ -656,17 +629,8 @@ function($, _, moment) {
656
629
{ text : 'minutes (m)' , value : 'm' } ,
657
630
{ text : 'hours (h)' , value : 'h' } ,
658
631
{ text : 'days (d)' , value : 'd' } ,
659
- ]
660
- } ,
661
- {
662
- text : 'date and time' ,
663
- submenu : [
664
- { text : 'date and time (ms)' , value : 'dtms' } ,
665
- { text : 'date and time (s)' , value : 'dts' } ,
666
- { text : 'from now (ms)' , value : 'dtfromnowms' } ,
667
- { text : 'from now (s)' , value : 'dtfromnows' } ,
668
- { text : 'duration (ms)' , value : 'dtdurationms' } ,
669
- { text : 'duration (s)' , value : 'dtdurations' }
632
+ { text : 'duration (ms)' , value : 'dtdurationms' } ,
633
+ { text : 'duration (s)' , value : 'dtdurations' }
670
634
]
671
635
} ,
672
636
{
0 commit comments