nitro-react/src/components/wired/common/GetWiredTimeLocale.ts

9 lines
182 B
TypeScript
Raw Normal View History

2022-01-14 06:21:10 +01:00
export const GetWiredTimeLocale = (value: number) =>
2021-06-28 18:32:06 +02:00
{
const time = Math.floor((value / 2));
if(!(value % 2)) return time.toString();
return (time + 0.5).toString();
}