luxon -> date-fns

This commit is contained in:
2021-08-26 22:50:02 +09:00
parent 54e7fd0293
commit c19b2a9ebe
7 changed files with 67 additions and 51 deletions
+3 -13
View File
@@ -1,14 +1,4 @@
import {DateTime} from 'luxon';
export const DATE_TIME_FORMAT = 'yyyy-MM-dd HH:mm:ss';
export const DATE_TIME_FORMAT_WITH_FRACTION = 'yyyy-MM-dd HH:mm:ss.SSS';
export function getDateTimeNow(withFraction = false): string{
if(withFraction){
return DateTime.now().toFormat(DATE_TIME_FORMAT_WITH_FRACTION);
}
else{
return DateTime.now().toFormat(DATE_TIME_FORMAT);
}
import { formatTime } from './formatTime';
export function getDateTimeNow(withFraction = false): string {
return formatTime(new Date(), withFraction);
}