summaryrefslogtreecommitdiffhomepage
path: root/app/components
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2018-07-24 10:38:03 -0300
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2018-07-24 13:40:37 -0300
commit0dc574dbdfab50c11ae05fd834e1b76448ca95eb (patch)
treee61b4355420e603b721f356839ab0d011422bce7 /app/components
parent7fc6c80ee49d57fc84597d83b0216dd8df6dc127 (diff)
downloadmullvadvpn-0dc574dbdfab50c11ae05fd834e1b76448ca95eb.tar.xz
mullvadvpn-0dc574dbdfab50c11ae05fd834e1b76448ca95eb.zip
Localize expiry time
Diffstat (limited to 'app/components')
-rw-r--r--app/components/Account.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/components/Account.js b/app/components/Account.js
index 9b6e1c8dea..bcb2c11ebd 100644
--- a/app/components/Account.js
+++ b/app/components/Account.js
@@ -14,6 +14,7 @@ import type { AccountToken } from '../lib/daemon-rpc';
export type AccountProps = {
accountToken: AccountToken,
accountExpiry: string,
+ expiryLocale: string,
updateAccountExpiry: () => Promise<void>,
onLogout: () => void,
onClose: () => void,
@@ -76,9 +77,15 @@ export default class Account extends Component<AccountProps, AccountState> {
render() {
const expiry = moment(this.props.accountExpiry);
- const formattedAccountToken = formatAccount(this.props.accountToken || '');
- const formattedExpiry = expiry.format('hA, D MMMM YYYY').toUpperCase();
const isOutOfTime = expiry.isSameOrBefore(moment());
+ const formattedAccountToken = formatAccount(this.props.accountToken || '');
+ const formattedExpiry = expiry.toDate().toLocaleString(this.props.expiryLocale, {
+ day: 'numeric',
+ month: 'long',
+ year: 'numeric',
+ hour: 'numeric',
+ minute: 'numeric',
+ });
return (
<Layout>