Merge pull request #296 from mike-bricknell-barlow/feature/convert-time-to-decimal

Add tool to convert human time to decimal time
This commit is contained in:
Ibrahima G. Coulibaly
2025-12-07 16:43:28 +01:00
committed by GitHub
8 changed files with 234 additions and 1 deletions

View File

@@ -113,5 +113,11 @@
"zeroPaddingDescription": "Make all time components always be two digits wide.",
"zeroPrintDescription": "Display the dropped parts as zero values \"00\".",
"zeroPrintTruncatedParts": "Zero-print Truncated Parts"
},
"convertTimeToDecimal": {
"title": "Convert time to decimal",
"description": "Convert a formatted time duration (HH:MM:SS) into a decimal hour value.",
"shortDescription": "Convert human time to decimal time",
"longDescription": "Convert a formatted time string (HH:MM:SS or HH:MM) into its decimal-hour equivalent. Hours can be any positive number, while minutes and seconds accept values from 0-59 and can be single or double digits (e.g., '12:5' or '12:05'). This function interprets hours, minutes, and seconds, then calculates the total duration as a single decimal value. It is useful for productivity tracking, payroll calculations, time-based billing, data analysis, or any workflow that requires converting human-readable time into a numerical format that can be easily summed, compared, or processed. For example, '03:26:00' becomes 3.43 hours, and '12:5' becomes 12.08 hours."
}
}