-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwid-card-process-status.js
More file actions
74 lines (62 loc) · 1.47 KB
/
wid-card-process-status.js
File metadata and controls
74 lines (62 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
'use strict';
(function () {
Polymer({
is: 'wid-card-process-status',
behaviors: [Polymer.WidCardStandardBehavior, Polymer.WidCardWeightBehavior, Polymer.WidCardSubscriptionsBehavior, Polymer.WidCardThemeBehavior],
properties: {
/**
* Active
* @type {Boolean}
*/
active: {
type: Boolean,
value: false
},
/**
* name
* @type {String}
*/
name: {
type: String,
value: 'Process'
},
/**
* Status
* @type {Number}
*/
status: {
type: Number,
value: '~'
},
/**
* User
* @type {String}
*/
user: {
type: String,
value: ''
},
/**
* Datetime
* @type {String}
*/
datetime: {
type: String,
value: '10/21/85 04:29'
}
},
_localDateTime: function _localDateTime(serverdate) {
var date = new Date(serverdate + ' UTC');
var month = date.getMonth() + 1;
var day = date.getDate();
var year = String(date.getFullYear()).substring(2, 4);
var hours = date.getHours();
var minutes = date.getMinutes();
month = month < 10 ? '0' + month : month;
day = day < 10 ? '0' + day : day;
hours = hours < 10 ? '0' + hours : hours;
minutes = minutes < 10 ? '0' + minutes : minutes;
return month + '/' + day + '/' + year + ' ' + hours + ':' + minutes;
}
});
})();