From 0b103ec1bf603e8f84ed12dade22736f4f7f609d Mon Sep 17 00:00:00 2001 From: Akmal Isomadinov Date: Tue, 19 Sep 2023 16:49:02 +0500 Subject: [PATCH] Web:Cron Added local --- packages/components/cron/util.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/components/cron/util.ts b/packages/components/cron/util.ts index 80663ae7bc..70f3409a24 100644 --- a/packages/components/cron/util.ts +++ b/packages/components/cron/util.ts @@ -68,13 +68,13 @@ export const getPeriodFromCronParts = (cronParts: number[][]): PeriodType => { return "Hour"; }; -export const fixFormatValue = (value: number) => { - let result = value.toString(); - - if (value < 10) { - result = result.padStart(2, "0"); - } - +export const fixFormatValue = (value: number, local: string) => { + let result = value.toLocaleString(local, { + minimumIntegerDigits: 2, + minimumFractionDigits: 0, + maximumFractionDigits: 0, + useGrouping: false, + }); return result; };