Changeset 28b3398 for jobvista-frontend/src/utils
- Timestamp:
- 06/09/24 14:24:03 (5 months ago)
- Branches:
- main
- Children:
- b248810
- Parents:
- 19398ad
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
jobvista-frontend/src/utils/utils.js
r19398ad r28b3398 3 3 export const sortElementsByDateCreated = (array) => { 4 4 return array.slice().sort((a, b) => { 5 return new Date(b.postedAt).getTime() - new Date(a.postedAt).getTime() 5 return new Date(b.postedOn).getTime() - new Date(a.postedOn).getTime() 6 }); 7 } 8 9 export const sortElementsBySubmissionDate = (array) => { 10 return array.slice().sort((a, b) => { 11 return new Date(b.postedOn).getTime() - new Date(a.postedOn).getTime() 6 12 }); 7 13 }
Note:
See TracChangeset
for help on using the changeset viewer.