File tree 2 files changed +45
-14
lines changed
2 files changed +45
-14
lines changed Original file line number Diff line number Diff line change 1
1
helpers = { }
2
2
3
3
tmp . helpers = [
4
- 'p' ,
5
- 'balance' ,
6
- 'rightJust' ,
7
- 'filterByProperty' ,
8
- 'capitalize' ,
9
- 'ls' ,
10
- 'converters' ,
11
- 'newAccount' ,
12
- 'walletFilters' ,
13
- 'unlockAccountByIndex' ,
4
+ "p" ,
5
+ "balance" ,
6
+ "rightJust" ,
7
+ "filterByProperty" ,
8
+ "capitalize" ,
9
+ "ls" ,
10
+ "converters" ,
11
+ "newAccount" ,
12
+ "walletFilters" ,
13
+ "status" ,
14
+ "unlockAccountByIndex" ,
14
15
]
15
16
16
- tmp . helpers
17
- . forEach ( function ( helper ) {
18
- loadScript ( './helpers/' + helper + '.js' )
19
- } ) ;
17
+ tmp . helpers . forEach ( function ( helper ) {
18
+ loadScript ( "./helpers/" + helper + ".js" )
19
+ } )
Original file line number Diff line number Diff line change
1
+ function date ( ) {
2
+ var unix = Math . round ( Date . now ( ) / 1000 ) . toString ( )
3
+
4
+ var today = new Date ( )
5
+ var _date = today . getDate ( ) . toString ( )
6
+ var date = _date . length == 1 ? "0" + _date : _date
7
+ var _month = ( today . getMonth ( ) + 1 ) . toString ( )
8
+ var month = _month . length == 1 ? "0" + _month : _month
9
+ var year = today . getFullYear ( ) . toString ( )
10
+
11
+ var shortFormat = date + "/" + month + "/" + year
12
+
13
+ var hours = today . getHours ( )
14
+ var minutes = today . getMinutes ( )
15
+ var seconds = today . getSeconds ( )
16
+ var time = [ hours , minutes , seconds ] . join ( ":" )
17
+
18
+ var longFormat = shortFormat + " " + time
19
+
20
+ return {
21
+ unix : unix ,
22
+ shortFormat : shortFormat ,
23
+ longFormat : longFormat ,
24
+ }
25
+ }
26
+
27
+ helpers . status = function ( ) {
28
+ var currentBlock = eth . syncing . currentBlock
29
+
30
+ return date ( ) . longFormat + " : " + currentBlock
31
+ }
You can’t perform that action at this time.
0 commit comments