react-native-hour-format
Get hour format from OS settings.
Installation
Add as dependency:
npm i --save react-native-hour-format
Link with react-native:
react-native link react-native-hour-format
Usage
There are three methods you can call:
; HourFormat // boolHourFormat // 12 or 24HourFormat // string with system locale
momentjs
Integration with Use below snippet so moment().format('LT')
will return correctly formated values.
;; const is24HourFormat = HourFormat;moment;