summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-10-19 05:23:48 -0400
committerCorey Hulen <corey@hulen.com>2016-10-19 02:23:48 -0700
commit0512bd26ee85473aa47206d5f207a9a506019138 (patch)
treef658efb1e4201f8446fce6345948ef945688162b /webapp/utils
parent11bf05813a66b85248e62a15b5874423b7c2e13d (diff)
downloadchat-0512bd26ee85473aa47206d5f207a9a506019138.tar.gz
chat-0512bd26ee85473aa47206d5f207a9a506019138.tar.bz2
chat-0512bd26ee85473aa47206d5f207a9a506019138.zip
Fix date on license expiry messages (#4258)
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/license_utils.jsx13
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'});
}