chore: spec fixes

This commit is contained in:
iamsivin
2023-05-19 18:55:09 +05:30
parent 6d07a7d92e
commit 8fb043de54
2 changed files with 55 additions and 11 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ export const getUnixStartOfDay = date => getUnixTime(startOfDay(date));
export const getUnixEndOfDay = date => getUnixTime(endOfDay(date));
export const generateRelativeTime = (value, unit, languageCode) => {
const code = languageCode.replace(/_/g, '-'); // Hacky fix we need to handle it from source
const code = languageCode?.replace(/_/g, '-'); // Hacky fix we need to handle it from source
const rtf = new Intl.RelativeTimeFormat(code, {
numeric: 'auto',
});