Merge pull request #2450 from BlueWallet/limpbrains-dayjs-local

FIX: use dayjs localizedFormat plugin to render tx time
This commit is contained in:
GLaDOS 2021-01-03 11:02:07 +00:00 committed by GitHub
commit 94bd1c9c8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import Localization from 'react-localization';
import AsyncStorage from '@react-native-async-storage/async-storage';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import localizedFormat from 'dayjs/plugin/localizedFormat';
import * as RNLocalize from 'react-native-localize';
import BigNumber from 'bignumber.js';
@ -11,6 +12,7 @@ import { AvailableLanguages } from './languages';
const currency = require('../blue_modules/currency');
dayjs.extend(relativeTime);
dayjs.extend(localizedFormat)
// first-time loading sequence

View File

@ -203,7 +203,7 @@ const TransactionsDetails = () => {
{tx.received && (
<>
<BlueText style={[styles.rowCaption, stylesHooks.rowCaption]}>{loc.transactions.details_received}</BlueText>
<BlueText style={styles.rowValue}>{dayjs(tx.received).format('MM/DD/YYYY h:mm A')}</BlueText>
<BlueText style={styles.rowValue}>{dayjs(tx.received).format('LLL')}</BlueText>
</>
)}