luxon -> date-fns
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user