hevy-shared 1.0.760 → 1.0.762
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -59,8 +59,8 @@ export interface NormalizedExercise {
|
|
|
59
59
|
volumeDoublingEnabled: boolean;
|
|
60
60
|
sets: NormalizedSet[];
|
|
61
61
|
}
|
|
62
|
-
export declare const calculateDuration: (normalizedWorkout: NormalizedWorkout, nowUnix: number) => number;
|
|
63
|
-
export declare const calculateEndTime: (normalizedWorkout: NormalizedWorkout, nowUnix: number) => number;
|
|
62
|
+
export declare const calculateDuration: (normalizedWorkout: Pick<NormalizedWorkout, "startTime" | "timeEvents">, nowUnix: number) => number;
|
|
63
|
+
export declare const calculateEndTime: (normalizedWorkout: Pick<NormalizedWorkout, "startTime" | "timeEvents">, nowUnix: number) => number;
|
|
64
64
|
interface GenerateWorkoutTimeEventsArgs {
|
|
65
65
|
startTimeUnix: number;
|
|
66
66
|
durationSeconds: number;
|
package/built/units.js
CHANGED
|
@@ -30,7 +30,14 @@ const exactMetersToMiles = (meters) => {
|
|
|
30
30
|
exports.exactMetersToMiles = exactMetersToMiles;
|
|
31
31
|
const roundedCmToFtIn = (cm) => {
|
|
32
32
|
const totalInches = (0, exports.exactCmtoInch)(cm);
|
|
33
|
-
|
|
33
|
+
const feet = Math.floor(totalInches / 12);
|
|
34
|
+
const inches = Math.round(totalInches % 12);
|
|
35
|
+
if (inches === 12) {
|
|
36
|
+
return { ft: feet + 1, in: 0 };
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return { ft: feet, in: inches };
|
|
40
|
+
}
|
|
34
41
|
};
|
|
35
42
|
exports.roundedCmToFtIn = roundedCmToFtIn;
|
|
36
43
|
const exactFtInToCm = (ftIn) => {
|