clock-format-utility
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -1,1 +0,1 @@ | ||
Object.defineProperty(exports,"__esModule",{value:true});var specificClockConfig={'en-SV':'24'};var detectDeviceLocale=exports.detectDeviceLocale=function detectDeviceLocale(){try{var deviceInfo=require('react-native-device-info');return deviceInfo.getDeviceLocale();}catch(e){return window.navigator.languages&&window.navigator.languages.length>0?window.navigator.languages[0]:window.navigator.language||window.navigator.userLanguage;}};var detectDeviceClockFormat=exports.detectDeviceClockFormat=function detectDeviceClockFormat(){var locale=arguments.length>0&&arguments[0]!==undefined?arguments[0]:detectDeviceLocale();if(specificClockConfig[locale]){return specificClockConfig[locale];}var timeString=new Date().toLocaleTimeString(locale),foundAMorPM=timeString.indexOf('AM')>-1||timeString.indexOf('PM')>-1;return foundAMorPM?'12':'24';};exports.default={detectDeviceClockFormat:detectDeviceClockFormat,detectDeviceLocale:detectDeviceLocale}; | ||
Object.defineProperty(exports,"__esModule",{value:true});var specificClockConfig={'en-SV':'24'};var detectDeviceLocale=exports.detectDeviceLocale=function detectDeviceLocale(){try{var deviceInfo=require('react-native-device-info');return deviceInfo.getDeviceLocale();}catch(e){try{return window.navigator.languages&&window.navigator.languages.length>0?window.navigator.languages[0]:window.navigator.language||window.navigator.userLanguage;}catch(ex){return'en-US';}}};var detectDeviceClockFormat=exports.detectDeviceClockFormat=function detectDeviceClockFormat(){var locale=arguments.length>0&&arguments[0]!==undefined?arguments[0]:detectDeviceLocale();if(specificClockConfig[locale]){return specificClockConfig[locale];}var timeString=new Date().toLocaleTimeString(locale),foundAMorPM=timeString.indexOf('AM')>-1||timeString.indexOf('PM')>-1;return foundAMorPM?'12':'24';};exports.default={detectDeviceClockFormat:detectDeviceClockFormat,detectDeviceLocale:detectDeviceLocale}; |
{ | ||
"name": "clock-format-utility", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Utility that can detect clock format (12/24 hour) and can set clock format for moment", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6930