From 37e72b88d377cb101de23bf6fc6dea86b28af126 Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Thu, 12 Oct 2017 21:39:44 +0300 Subject: [PATCH] [Fix] utils/moment - RN 0.49 compatibily --- utils/moment.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils/moment.js b/utils/moment.js index b041e18..458ca9b 100644 --- a/utils/moment.js +++ b/utils/moment.js @@ -1,8 +1,10 @@ // @flow -import DeviceInfo from 'react-native-device-info'; -import moment from 'moment/min/moment-with-locales.min'; +import { getDeviceLocale } from 'react-native-device-info'; +import moment from 'moment'; -moment.locale(DeviceInfo.getDeviceLocale().split('-')[0]); +import 'moment/min/locales'; + +moment.locale(getDeviceLocale().split('-')[0]); export default moment;