Added sorting functions in search

This commit is contained in:
Alexis
2024-04-06 23:45:34 +02:00
parent dd8c4727a3
commit 9df9049fdf
6 changed files with 133 additions and 31 deletions

View File

@@ -316,18 +316,6 @@ export const useCalendar = defineStore('calendar', () => {
return `${getMonthName(date.month)} ${date.year} ${getPeriodOfYear(date.year).short}`
}
/**
* Check whether two dates are identical
*
* @param date1 First date
* @param date2 Second date
* @returns True if the dates are identical
*/
function compareTwoDates(date1: LeimDate, date2: LeimDate) {
// To refacto to be more precise
return JSON.stringify({ ...date1 }) === JSON.stringify({ ...date2 })
}
/**
* Jumps the calendar to the given date
*
@@ -362,7 +350,6 @@ export const useCalendar = defineStore('calendar', () => {
decrementYear,
jumpToDate,
jumpToDefaultDate,
compareTwoDates,
getFormattedDateTitle,
getMonthName,
setViewType,