@oxygen-cms/ui 1.6.3 → 1.6.4
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/package.json +1 -1
- package/src/EventsApi.js +5 -0
- package/src/Internationalize.js +12 -0
- package/src/icons.js +2 -2
package/package.json
CHANGED
package/src/EventsApi.js
CHANGED
package/src/Internationalize.js
CHANGED
|
@@ -28,4 +28,16 @@ export default class Internationalize {
|
|
|
28
28
|
}
|
|
29
29
|
return format.format(datetime);
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
static formatDateTimeRange(from, to) {
|
|
33
|
+
let format = new Intl.DateTimeFormat(this.locale , {
|
|
34
|
+
hour: 'numeric', minute: 'numeric'
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
if(from.getDate() === to.getDate() && from.getMonth() === to.getMonth() && from.getYear() === to.getYear()) {
|
|
38
|
+
return this.formatDate(from) + " " + format.format(from) + " - " + format.format(to);
|
|
39
|
+
} else {
|
|
40
|
+
return this.formatDate(from) + " " + format.format(from) + " - " + this.formatDate(to) + format.format(to);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
31
43
|
}
|
package/src/icons.js
CHANGED
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
faFolderOpen,
|
|
75
75
|
faImages,
|
|
76
76
|
faMinusCircle,
|
|
77
|
-
faCalendarPlus, faPaperPlane
|
|
77
|
+
faCalendarPlus, faPaperPlane, faHandshakeSlash, faHandshake
|
|
78
78
|
} from "@fortawesome/free-solid-svg-icons";
|
|
79
79
|
|
|
80
80
|
export const addIconsToLibrary = () => {
|
|
@@ -87,5 +87,5 @@ export const addIconsToLibrary = () => {
|
|
|
87
87
|
faFileExcel, faFileCsv, faChevronCircleDown, faChevronCircleUp, faTrash,
|
|
88
88
|
faEye, faEyeSlash, faCaretDown, faCaretUp, faUpload, faUser, faFolder, faHome, faFilePdf, faSignOutAlt, faTag,
|
|
89
89
|
faFolderPlus, faTimes, faQuestionCircle, faFileUpload, faLandmark,
|
|
90
|
-
faFolderOpen, faFile, faFileAudio, faFileImage, faShare, faImages, faCalendarPlus, faPaperPlane);
|
|
90
|
+
faFolderOpen, faFile, faFileAudio, faFileImage, faShare, faImages, faCalendarPlus, faPaperPlane, faHandshake, faHandshakeSlash);
|
|
91
91
|
};
|