+ /** Sorting the list based on date @public */
+ public compareFunction = (dir: number, a: string, b: string): number => {
+ const first: number = new Date(a).getTime();
+ const second: number = new Date(b).getTime();
+ if (first < second) {
+ return -1 * dir;
+ }
+ if (first > second) {
+ return dir;
+ }
+ return 0;
+ };
+