+ client: show date in query logs

This commit is contained in:
Artem Baskal 2019-12-24 00:29:10 +03:00
parent 3a077717ae
commit 108cf73a30
2 changed files with 21 additions and 6 deletions
client/src/helpers

View file

@ -39,6 +39,19 @@ export const formatDateTime = (dateTime) => {
return parsedTime.toLocaleString(currentLanguage, options);
};
export const formatTodayDate = (dateTime) => {
const currentLanguage = i18n.languages[0] || 'en';
const parsedTime = dateParse(dateTime);
const options = {
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour12: false,
};
return parsedTime.toLocaleString(currentLanguage, options);
};
export const normalizeLogs = logs => logs.map((log) => {
const {
time,