Merge pull request #787 from ente-io/fix-window-undefined-error

remove constants fom time format
This commit is contained in:
Abhinav Kumar 2022-11-28 15:14:25 +05:30 committed by GitHub
commit bb2fbafc0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {