Skip to content

Commit

Permalink
feat: force analytics-utilities build [MA-3442]
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-peteu committed Dec 3, 2024
1 parent a4fe4c3 commit 8cb7c51
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/analytics/analytics-utilities/src/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ export function formatTime(ts: number, options: TimeFormatOptions = {}) {
}
}

/**
* Formatted display for a start and end time range
* @param start Date from
* @param end Date to
* @returns Human-readable date range string
*/
export function formatTimeRange(start: Date, end: Date) {
return `${formatTime(start.getTime())} - ${formatTime(end.getTime(), { includeTZ: true })}`
}

0 comments on commit 8cb7c51

Please sign in to comment.