File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 66
77// Tweak the global fetch
88import './globalize-fetch'
9+ import './setup-moment'
910import { tracker } from './analytics'
1011import OneSignal from 'react-native-onesignal'
1112
Original file line number Diff line number Diff line change 1+ // @flow
2+ import moment from 'moment-timezone'
3+
4+ // These next values made possible by
5+ // http://stackoverflow.com/questions/42513276
6+
7+ // Tell Moment to round up, so that Moment will always report the
8+ // time until something else in a way that matches the clock time.
9+ // That is, at 5:22pm, Moment will report "8 minutes until 5:30pm"
10+ // until the clock ticks over to 5:23pm.
11+ // If we do Math.floor, we go the other direction: it will report
12+ // "7 minutes until 5:30pm" as soon as 5:22pm starts.
13+ moment . relativeTimeRounding ( Math . ceil )
14+
15+ // Tell Moment that a minute is 60 seconds, for reporting purposes.
16+ // It defaults to 45 seconds.
17+ moment . relativeTimeThreshold ( 's' , 60 )
You can’t perform that action at this time.
0 commit comments