refactor: simplify calendar and form state
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { moscowDate } from "@/shared/lib";
|
||||
|
||||
const DECIMAL_PART_COUNT = 2;
|
||||
const CENTS_PRECISION = 2;
|
||||
|
||||
@@ -21,12 +23,7 @@ function bankMonth(value: null | string) {
|
||||
}
|
||||
|
||||
function bankToday() {
|
||||
return new Intl.DateTimeFormat("en-CA", {
|
||||
day: "2-digit",
|
||||
month: "2-digit",
|
||||
timeZone: "Europe/Moscow",
|
||||
year: "numeric",
|
||||
}).format(new Date());
|
||||
return moscowDate(new Date());
|
||||
}
|
||||
|
||||
function moneyCents(value: string): bigint | null {
|
||||
|
||||
Reference in New Issue
Block a user