Skip to content

Commit

Permalink
chore: DAY 상수 utill 모듈로 이동 및 import 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
n-ryu committed Nov 29, 2022
1 parent a77c6f6 commit 15bc053
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions client/src/core/todo/todo.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { uuid } from 'uuidv4';
import { PlainTodo, InputTodo } from '@todo/todo.type';
import { isEqualDate } from '@todo/todo.util';

const DAY = 24 * 60 * 60 * 1000;

import { isEqualDate, DAY } from '@todo/todo.util';
export class Todo {
id: string;
title: string;
Expand Down
1 change: 1 addition & 0 deletions client/src/core/todo/todo.util.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export const onlyDate = (date: Date): Date => new Date(date.getFullYear(), date.getMonth(), date.getDate());
export const isEqualDate = (d1: Date, d2: Date): boolean => onlyDate(d1).getTime() === onlyDate(d2).getTime();
export const DAY = 24 * 60 * 60 * 1000;
2 changes: 1 addition & 1 deletion client/src/core/todo/todoList.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PlainTodo, InputTodo } from '@todo/todo.type';
import { Todo } from '@todo/todo';
import { isEqualDate } from '@todo/todo.util';
import { isEqualDate, DAY } from '@todo/todo.util';
import { compareFunctions } from '@todo/todoList.util';
import { ITodoListDataBase } from '@todo/todoList.interface';
export class TodoList {
Expand Down

0 comments on commit 15bc053

Please sign in to comment.