Skip to content

Commit

Permalink
Merge pull request #88 from tempfiles-Team/85-파일-업로드-날짜가-이상해요
Browse files Browse the repository at this point in the history
85 파일 업로드 날짜가 이상해요
  • Loading branch information
ananjaemin committed Nov 17, 2022
2 parents eb74bbb + 90176db commit ef9d533
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/pages/main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useNavigate } from 'react-router-dom';
import { toast } from 'react-toastify';
import { bindActionCreators } from 'redux';

// eslint-disable-next-line
import { CheckBox, PasswordInput, UpLoadButton, FileFind, Progress } from '../../components';
import { actionCreators } from '../../state';
import { getFileSize } from '../../utils';
Expand Down
4 changes: 2 additions & 2 deletions src/utils/getDate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const getDate = (date: string) => {
const NewDate = new Date(date);
return { year: NewDate.getFullYear(), month: NewDate.getMonth() + 1, day: NewDate.getDay() };
const NewDate = date.split('T')[0].split('-');
return { year: Number(NewDate[0]), month: Number(NewDate[1]), day: Number(NewDate[2]) };
};

0 comments on commit ef9d533

Please sign in to comment.