Skip to content

Commit

Permalink
feature: adjust list command to show results from last 24 hours by de…
Browse files Browse the repository at this point in the history
…fault
  • Loading branch information
f3rno64 committed Dec 19, 2023
1 parent 1c23043 commit b7320a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/commands/list/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const handler = (args: ListCommandArgs) => {
: today
? D.getStartOfDay()
: yesterday
? D.getStartOfDay(new Date(Date.now() - D.getDaysMS(1)))
: null
? D.getPastDay(1)
: new Date(Date.now() - D.getDaysMS(1))

const filteredSheets =
sinceDate === null
Expand Down
6 changes: 2 additions & 4 deletions src/print/columns/get_sheet_entry_columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ const getSheetEntryColumns = (
`(${idUI})`,
`[${durationUI}]`,
`started ${startUI}`,
end === null ? null : `ended ${endUI}`,
end === null ? C.clHighlightRed('active') : `ended ${endUI}`,
descriptionUI
]).map((value: string): string =>
isActive ? colors.bold.underline(value) : value
)
]).map((value: string): string => (isActive ? colors.bold(value) : value))
}

export default getSheetEntryColumns

0 comments on commit b7320a0

Please sign in to comment.