Merge pull request #787 from ente-io/fix-window-undefined-error
remove constants fom time format
This commit is contained in:
commit
bb2fbafc0c
|
@ -1,5 +1,3 @@
|
|||
import constants from 'utils/strings/constants';
|
||||
|
||||
export function formatDateFull(date: number | Date) {
|
||||
const dateTimeFormat1 = new Intl.DateTimeFormat('en-US', {
|
||||
weekday: 'short',
|
||||
|
@ -55,13 +53,11 @@ export function formatTime(date: number | Date) {
|
|||
}
|
||||
|
||||
export function formatDateTimeFull(dateTime: number | Date): string {
|
||||
return [formatDateFull(dateTime), constants.AT, formatTime(dateTime)].join(
|
||||
' '
|
||||
);
|
||||
return [formatDateFull(dateTime), 'at', formatTime(dateTime)].join(' ');
|
||||
}
|
||||
|
||||
export function formatDateTime(dateTime: number | Date): string {
|
||||
return [formatDate(dateTime), constants.AT, formatTime(dateTime)].join(' ');
|
||||
return [formatDate(dateTime), 'at', formatTime(dateTime)].join(' ');
|
||||
}
|
||||
|
||||
export function formatDateRelative(date: number) {
|
||||
|
|
Loading…
Reference in a new issue