refac/enh: date format i18n
This commit is contained in:
@@ -634,7 +634,12 @@
|
||||
: 'invisible group-hover:visible transition text-gray-400'}"
|
||||
>
|
||||
<Tooltip content={dayjs(message.timestamp * 1000).format('LLLL')}>
|
||||
<span class="line-clamp-1">{formatDate(message.timestamp * 1000)}</span>
|
||||
<span class="line-clamp-1"
|
||||
>{$i18n.t(formatDate(message.timestamp * 1000), {
|
||||
LOCALIZED_TIME: dayjs(message.timestamp * 1000).format('LT'),
|
||||
LOCALIZED_DATE: dayjs(message.timestamp * 1000).format('L')
|
||||
})}</span
|
||||
>
|
||||
</Tooltip>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -153,7 +153,16 @@
|
||||
: 'invisible group-hover:visible transition'}"
|
||||
>
|
||||
<Tooltip content={dayjs(message.timestamp * 1000).format('LLLL')}>
|
||||
<span class="line-clamp-1">{formatDate(message.timestamp * 1000)}</span>
|
||||
<!-- $i18n.t('Today at {{LOCALIZED_TIME}}') -->
|
||||
<!-- $i18n.t('Yesterday at {{LOCALIZED_TIME}}') -->
|
||||
<!-- $i18n.t('{{LOCALIZED_DATE}} at {{LOCALIZED_TIME}}') -->
|
||||
|
||||
<span class="line-clamp-1"
|
||||
>{$i18n.t(formatDate(message.timestamp * 1000), {
|
||||
LOCALIZED_TIME: dayjs(message.timestamp * 1000).format('LT'),
|
||||
LOCALIZED_DATE: dayjs(message.timestamp * 1000).format('L')
|
||||
})}</span
|
||||
>
|
||||
</Tooltip>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -168,7 +177,12 @@
|
||||
: 'invisible group-hover:visible transition text-gray-400'}"
|
||||
>
|
||||
<Tooltip content={dayjs(message.timestamp * 1000).format('LLLL')}>
|
||||
<span class="line-clamp-1">{formatDate(message.timestamp * 1000)}</span>
|
||||
<span class="line-clamp-1"
|
||||
>{$i18n.t(formatDate(message.timestamp * 1000), {
|
||||
LOCALIZED_TIME: dayjs(message.timestamp * 1000).format('LT'),
|
||||
LOCALIZED_DATE: dayjs(message.timestamp * 1000).format('L')
|
||||
})}</span
|
||||
>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user