MCPcopy Index your code
hub / github.com/csev/py4e / meridiemFixWrap

Function meridiemFixWrap

code/gmane/Chart.bundle.js:2822–2845  ·  view source on GitHub ↗
(locale, hour, meridiem)

Source from the content-addressed store, hash-verified

2820
2821
2822 function meridiemFixWrap (locale, hour, meridiem) {
2823 var isPm;
2824
2825 if (meridiem == null) {
2826 // nothing to do
2827 return hour;
2828 }
2829 if (locale.meridiemHour != null) {
2830 return locale.meridiemHour(hour, meridiem);
2831 } else if (locale.isPM != null) {
2832 // Fallback
2833 isPm = locale.isPM(meridiem);
2834 if (isPm && hour < 12) {
2835 hour += 12;
2836 }
2837 if (!isPm && hour === 12) {
2838 hour = 0;
2839 }
2840 return hour;
2841 } else {
2842 // this is not supposed to happen
2843 return hour;
2844 }
2845 }
2846
2847 function configFromStringAndArray(config) {
2848 var tempConfig,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected