UNPKG

@sports-alliance/sports-lib

Version:

A Library to for importing / exporting and processing GPX, TCX, FIT and JSON files from services such as Strava, Movescount, Garmin, Polar etc

23 lines (22 loc) 916 B
import { DataNumber } from './data.number'; export declare class DataDuration extends DataNumber { static type: string; static unit: string; /** * Converts to hhh:mmm:ss:ms * @todo should adopt and round depending if needed to show seconds or not * @param showDays * @param showSeconds * @param showMilliseconds * @param useColonFormat when true, returns compact colon-separated format e.g. `1:04:32` */ getDisplayValue(showDays?: boolean, showSeconds?: boolean, showMilliseconds?: boolean, useColonFormat?: boolean): string; /** * Formats an elapsed duration as a stopwatch value, such as `1:36.12`. * * Uses a single minute digit for sub-hour durations, pads seconds to two * digits, and retains trailing zeroes in the fractional part. */ getStopwatchDisplayValue(fractionDigits?: number): string; getDisplayUnit(): string; }