[WEB-1803] chore: workspace notification sorting when we refresh the notifications on workspace notifications (#5049)
* chore: workspace notification sorting when we refresh the notifications on workspace notifications * chore: replaced sorting with ISO to EPOCH * chore: converted obj to array
This commit is contained in:
parent
61ce055cb3
commit
c75091ca3a
2 changed files with 21 additions and 1 deletions
|
|
@ -279,6 +279,18 @@ export const convertToISODateString = (dateString: string | undefined) => {
|
|||
return date.toISOString();
|
||||
};
|
||||
|
||||
/**
|
||||
* returns the date string in Epoch regardless of the timezone in input date string
|
||||
* @param dateString
|
||||
* @returns
|
||||
*/
|
||||
export const convertToEpoch = (dateString: string | undefined) => {
|
||||
if (!dateString) return dateString;
|
||||
|
||||
const date = new Date(dateString);
|
||||
return date.getTime();
|
||||
};
|
||||
|
||||
/**
|
||||
* get current Date time in UTC ISO format
|
||||
* @returns
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue