This commit is contained in:
2024-04-10 03:46:06 +03:00
parent 6328ac877a
commit 4ce516307d
18 changed files with 435 additions and 22 deletions

View File

@@ -4,4 +4,9 @@ export const dateWithoutTimezone = (date: Date) => {
.toISOString()
.slice(0, -1);
return withoutTimezone;
};
export const getDigitsCount = (num: number): number => {
if (num === 0) return 1;
return Math.floor(Math.log10(Math.abs(num))) + 1;
};