diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-10-19 05:23:48 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-10-19 02:23:48 -0700 |
commit | 0512bd26ee85473aa47206d5f207a9a506019138 (patch) | |
tree | f658efb1e4201f8446fce6345948ef945688162b /webapp | |
parent | 11bf05813a66b85248e62a15b5874423b7c2e13d (diff) | |
download | chat-0512bd26ee85473aa47206d5f207a9a506019138.tar.gz chat-0512bd26ee85473aa47206d5f207a9a506019138.tar.bz2 chat-0512bd26ee85473aa47206d5f207a9a506019138.zip |
Fix date on license expiry messages (#4258)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/utils/license_utils.jsx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/webapp/utils/license_utils.jsx b/webapp/utils/license_utils.jsx index 0ee8b75de..c4be1f25e 100644 --- a/webapp/utils/license_utils.jsx +++ b/webapp/utils/license_utils.jsx @@ -3,8 +3,7 @@ import Constants from 'utils/constants.jsx'; -import React from 'react'; -import {FormattedDate} from 'react-intl'; +import LocalizationStore from 'stores/localization_store.jsx'; export function isLicenseExpiring() { if (window.mm_license.IsLicensed !== 'true') { @@ -34,12 +33,6 @@ export function isLicensePastGracePeriod() { } export function displayExpiryDate() { - return ( - <FormattedDate - value={new Date(parseInt(global.window.mm_license.ExpiresAt, 10))} - day='2-digit' - month='long' - year='numeric' - /> - ); + const date = new Date(parseInt(global.window.mm_license.ExpiresAt, 10)); + return date.toLocaleString(LocalizationStore.getLocale(), {year: 'numeric', month: 'long', day: 'numeric'}); } |