From 3fd28177ebb7ad3e427d25dc3b44d9b659c0cb2c Mon Sep 17 00:00:00 2001 From: Rory Abraham <47436092+roryabraham@users.noreply.github.com> Date: Thu, 24 Jun 2021 17:40:07 -0700 Subject: [PATCH] Merge pull request #3749 from Expensify/Rory-FixLanguagePicker Preload locales to fix native crash (cherry picked from commit 20312dee35b88cdf59a0d6020db6182596d3765c) --- src/libs/DateUtils.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libs/DateUtils.js b/src/libs/DateUtils.js index 84b44f501a15..7b9e77d9c919 100644 --- a/src/libs/DateUtils.js +++ b/src/libs/DateUtils.js @@ -1,5 +1,8 @@ -import moment from 'moment'; -import 'moment-timezone'; +import moment from 'moment-timezone'; + +// IMPORTANT: load any locales (other than english) that might be passed to moment.locale() +import 'moment/locale/es'; + import _ from 'underscore'; import Onyx from 'react-native-onyx'; import ONYXKEYS from '../ONYXKEYS';