iobroker-ucl 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/date.js +8 -8
- package/date.ts +2 -2
- package/main.js +2 -2
- package/main.ts +2 -2
- package/package.json +1 -1
- package/test.js +4 -1
- package/test.ts +5 -1
package/date.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
var
|
5
|
-
function
|
3
|
+
exports.DateUtil = void 0;
|
4
|
+
var DateUtil = /** @class */ (function () {
|
5
|
+
function DateUtil() {
|
6
6
|
}
|
7
|
-
|
7
|
+
DateUtil.prototype.getCurrentWeekdayAsString = function () {
|
8
8
|
var now = new Date();
|
9
9
|
var weekday = now.getDay();
|
10
10
|
return this.getWeekdayAsString(weekday);
|
11
11
|
};
|
12
|
-
|
12
|
+
DateUtil.prototype.getWeekdayAsString = function (weekday) {
|
13
13
|
var weekdayAsString;
|
14
14
|
if (weekday == 1) {
|
15
15
|
weekdayAsString = "Montag";
|
@@ -37,7 +37,7 @@ var DateUtil2 = /** @class */ (function () {
|
|
37
37
|
}
|
38
38
|
return weekdayAsString;
|
39
39
|
};
|
40
|
-
return
|
40
|
+
return DateUtil;
|
41
41
|
}());
|
42
|
-
exports.
|
43
|
-
module.exports = {
|
42
|
+
exports.DateUtil = DateUtil;
|
43
|
+
module.exports = { DateUtil: DateUtil };
|
package/date.ts
CHANGED
package/main.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
var
|
1
|
+
var DateUtil = require('./date.js').DateUtil;
|
2
2
|
var DateCalendarTest = require('./test.js').DateCalendarTest;
|
3
3
|
module.exports = {
|
4
|
-
|
4
|
+
DateUtil: DateUtil,
|
5
5
|
DateCalendarTest: DateCalendarTest
|
6
6
|
};
|
package/main.ts
CHANGED
package/package.json
CHANGED
package/test.js
CHANGED
@@ -15,7 +15,10 @@ var DateCalendarTest = /** @class */ (function () {
|
|
15
15
|
read: true,
|
16
16
|
write: true
|
17
17
|
});
|
18
|
-
|
18
|
+
var now = new Date();
|
19
|
+
var lastUpdate = now.getDate().toString().padStart(2, '0') + "." + (now.getMonth() + 1).toString().padStart(2, '0') + "." + now.getFullYear();
|
20
|
+
lastUpdate = lastUpdate + ", " + now.getHours().toString().padStart(2, '0') + ":" + now.getMinutes().toString().padStart(2, '0') + ":" + now.getSeconds().toString().padStart(2, '0') + "";
|
21
|
+
this.adapter.setState(mediolaText, lastUpdate);
|
19
22
|
this.adapter.log("<<< State created!");
|
20
23
|
var now = new Date();
|
21
24
|
var weekday = now.getDay();
|
package/test.ts
CHANGED
@@ -15,7 +15,11 @@ export class DateCalendarTest {
|
|
15
15
|
read: true,
|
16
16
|
write: true
|
17
17
|
});
|
18
|
-
|
18
|
+
|
19
|
+
var now = new Date();
|
20
|
+
var lastUpdate = now.getDate().toString().padStart(2,'0') + "." + (now.getMonth()+1).toString().padStart(2,'0') + "." + now.getFullYear();
|
21
|
+
lastUpdate = lastUpdate + ", " + now.getHours().toString().padStart(2,'0') + ":" + now.getMinutes().toString().padStart(2,'0') + ":" + now.getSeconds().toString().padStart(2,'0') + "";
|
22
|
+
this.adapter.setState(mediolaText, lastUpdate);
|
19
23
|
this.adapter.log("<<< State created!");
|
20
24
|
|
21
25
|
var now = new Date();
|