kaneo (minimalist kanban) fork to experiment adding a tangled integration
github.com/usekaneo/kaneo
1export function formatDuration(seconds: number): string {
2 const hours = Math.floor(seconds / 3600);
3 const minutes = Math.floor((seconds % 3600) / 60);
4 const remainingSeconds = seconds % 60;
5
6 if (hours > 0) {
7 return `${hours}h ${minutes}m ${remainingSeconds}s`;
8 }
9
10 if (minutes > 0) {
11 return `${minutes}m ${remainingSeconds}s`;
12 }
13
14 return `${remainingSeconds}s`;
15}