@eso-status/forum-message 2.0.0-dev.7 → 2.0.0-dev.9
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/lib/formatter/date.formatter.js +14 -4
- package/lib/identifier/slug.identifier.js +1 -0
- package/lib/type/remoteIssuesRawStatus.type.d.ts +4 -0
- package/lib/type/remoteIssuesRawStatus.type.js +3 -0
- package/lib/type/remoteRawSlug.type.d.ts +2 -1
- package/lib/type/remoteServerXboxEuRawSlug.type.d.ts +1 -1
- package/package.json +3 -1
|
@@ -79,28 +79,38 @@ class DateFormatter {
|
|
|
79
79
|
* @private
|
|
80
80
|
*/
|
|
81
81
|
getRawHour() {
|
|
82
|
-
return Number(this.rawDate
|
|
82
|
+
return Number(this.rawDate
|
|
83
|
+
.split(' UTC')[0]
|
|
84
|
+
.split(' ')
|
|
85
|
+
.pop()
|
|
86
|
+
.split(':')[0]
|
|
87
|
+
.replace('(', ''));
|
|
83
88
|
}
|
|
84
89
|
/**
|
|
85
90
|
* Method for retrieving the minute number of the start time for case #1
|
|
86
91
|
* @private
|
|
87
92
|
*/
|
|
88
93
|
getRawClassicMinute1() {
|
|
89
|
-
return Number(this.rawDate.split('
|
|
94
|
+
return Number(this.rawDate.split(' UTC')[0].split(':').pop());
|
|
90
95
|
}
|
|
91
96
|
/**
|
|
92
97
|
* Method for retrieving the end hour number in case #1
|
|
93
98
|
* @private
|
|
94
99
|
*/
|
|
95
100
|
getRawClassicHour2() {
|
|
96
|
-
return Number(this.rawDate
|
|
101
|
+
return Number(this.rawDate
|
|
102
|
+
.split(' UTC')[1]
|
|
103
|
+
.split(' ')
|
|
104
|
+
.pop()
|
|
105
|
+
.split(':')[0]
|
|
106
|
+
.replace('(', ''));
|
|
97
107
|
}
|
|
98
108
|
/**
|
|
99
109
|
* Method for retrieving the minute number of the end time in case #1
|
|
100
110
|
* @private
|
|
101
111
|
*/
|
|
102
112
|
getRawClassicMinute2() {
|
|
103
|
-
return Number(this.rawDate.split('
|
|
113
|
+
return Number(this.rawDate.split(' UTC')[1].split(':').pop());
|
|
104
114
|
}
|
|
105
115
|
/**
|
|
106
116
|
* Method for generating the correctly formatted date in case #2
|
|
@@ -5,7 +5,8 @@ import { RemoteServerPsEuRawSlug } from './remoteServerPsEuRawSlug.type';
|
|
|
5
5
|
import { RemoteServerXboxEuRawSlug } from './remoteServerXboxEuRawSlug.type';
|
|
6
6
|
import { RemoteServiceStoreEsoRawSlug } from './remoteServiceStoreEsoRawSlug.type';
|
|
7
7
|
import { RemoteServiceWebSiteRawSlug } from './remoteServiceWebSiteRawSlug.type';
|
|
8
|
+
import { RemoteServerXboxNaRawSlug } from './remoteServerXboxNaRawSlug.type';
|
|
8
9
|
/**
|
|
9
10
|
* Different slugs of announcements
|
|
10
11
|
*/
|
|
11
|
-
export type RemoteRawSlug = RemoteServerPcEuRawSlug | RemoteServerPcNaRawSlug | RemoteServerPcPtsRawSlug | RemoteServerPsEuRawSlug | RemoteServerXboxEuRawSlug | RemoteServiceStoreEsoRawSlug | RemoteServiceWebSiteRawSlug;
|
|
12
|
+
export type RemoteRawSlug = RemoteServerPcEuRawSlug | RemoteServerPcNaRawSlug | RemoteServerPcPtsRawSlug | RemoteServerPsEuRawSlug | RemoteServerXboxEuRawSlug | RemoteServerXboxNaRawSlug | RemoteServiceStoreEsoRawSlug | RemoteServiceWebSiteRawSlug;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eso-status/forum-message",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.9",
|
|
4
4
|
"description": "Library for retrieving and formatting data, available at https://forums.elderscrollsonline.com or https://forums.elderscrollsonline.com/en/categories/pts",
|
|
5
5
|
"author": "@dov118 <contact@dov118.dev> (https://dov118.dev)",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"lib/type/messageType.type.js",
|
|
20
20
|
"lib/type/remoteDownRawStatus.type.d.ts",
|
|
21
21
|
"lib/type/remoteDownRawStatus.type.js",
|
|
22
|
+
"lib/type/remoteIssuesRawStatus.type.d.ts",
|
|
23
|
+
"lib/type/remoteIssuesRawStatus.type.js",
|
|
22
24
|
"lib/type/remotePlannedRawStatus.type.d.ts",
|
|
23
25
|
"lib/type/remotePlannedRawStatus.type.js",
|
|
24
26
|
"lib/type/remoteRawSlug.type.d.ts",
|