Skip to content

Commit

Permalink
fix evolution
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitdemaegdt committed Jan 23, 2024
1 parent 8f7b6a0 commit 0ac7f77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions composables/useTooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ function getStatusText(status: Status, doneAt?: string): string {
function getDoneAtText(doneAt: string): string {
const [day, month, year] = doneAt.split('/');
const isBeforeMandat =
new Date(Number(year), Number(month) - 1, Number(day)).getTime() < new Date(2020, 0, 1).getTime();
new Date(Number(year), Number(month) - 1, Number(day)).getTime() < new Date(2021, 0, 1).getTime();
if (isBeforeMandat) {
return 'avant 2020';
return 'avant 2021';
}
return `le ${doneAt}`;
}
Expand Down
3 changes: 1 addition & 2 deletions pages/evolution/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ definePageMeta({
});
const years = ref([
{ label: '< 2020', match: (year) => year < 2020, isChecked: true },
{ label: '2020', match: (year) => year === 2020, isChecked: false },
{ label: '< 2021', match: (year) => year < 2021, isChecked: true },
{ label: '2021', match: (year) => year === 2021, isChecked: false },
{ label: '2022', match: (year) => year === 2022, isChecked: false },
{ label: '2023', match: (year) => year === 2023, isChecked: false },
Expand Down

0 comments on commit 0ac7f77

Please sign in to comment.