tools: remove date tool

This commit is contained in:
Chika 2022-07-08 21:07:50 +03:00
parent 04b87c44e4
commit 6f87b81400
3 changed files with 4 additions and 11 deletions

View File

@ -1,6 +1,6 @@
import { MAX_FRANCHISE, MAX_LEASING_PERIOD } from 'constants/values';
import dayjs from 'dayjs';
import DownloadOutlined from 'Elements/icons/DownloadOutlined';
import date from 'tools/date';
import { formatter, formatterExtra, parser } from 'tools/number';
import type { ElementsProps } from './elements-components';
@ -168,7 +168,7 @@ const props: Partial<ElementsProps> = {
},
tbxLeaseObjectYear: {
min: 1994,
max: date().year(),
max: dayjs().year(),
},
selectLeaseObjectCategory: {
showSearch: false,

View File

@ -1,6 +1,6 @@
import { RATE } from 'constants/values';
import dayjs from 'dayjs';
import type { CalculationValues } from 'stores/calculation/values/types';
import date from 'tools/date';
const defaultValues: CalculationValues = {
lead: null,
@ -39,7 +39,7 @@ const defaultValues: CalculationValues = {
maxMass: 0,
countSeats: 0,
maxSpeed: 0,
leaseObjectYear: date().year(),
leaseObjectYear: dayjs().year(),
engineType: 100_000_000,
leaseObjectCategory: null,
leaseObjectMotorPower: 0,

View File

@ -1,7 +0,0 @@
/* eslint-disable unicorn/prefer-export-from */
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
dayjs.extend(utc);
export default dayjs;