@boulevard/duration-select
Advanced tools
Comparing version 1.0.0-alpha.7 to 1.0.0-alpha.8
{ | ||
"name": "@boulevard/duration-select", | ||
"version": "1.0.0-alpha.7", | ||
"version": "1.0.0-alpha.8", | ||
"description": "A component for intelligently selecting durations.", | ||
@@ -5,0 +5,0 @@ "main": "index.ts", |
@@ -123,2 +123,4 @@ export interface DurationSelectInterface { | ||
let hourShortcut: string = noSpacesOrMinsReadoutArray[splitIndex - 1]; | ||
// Split the hours from the minutes on splitIndex character | ||
@@ -129,4 +131,7 @@ const modelSplitOnHoursShortcut: string[] = noSpacesOrMinsReadoutArray.join('') | ||
const hours: number = +(modelSplitOnHoursShortcut[0]) || 0; | ||
const minutes: number = +(modelSplitOnHoursShortcut[1]) || 0; | ||
let minutes: number = +(modelSplitOnHoursShortcut[1]) || 0; | ||
if (hourShortcut === '.') { | ||
minutes = 60 * parseFloat(`0.${minutes}`); | ||
} | ||
// Convert hours to minutes and add to minutes for total duration in minutes | ||
@@ -133,0 +138,0 @@ durationInMinutes = (hours * 60) + minutes; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19055
435