<filename>node_modules/.cache/babel-loader/63d23fffa8f9838fa56ea77bf755b08c.json
{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getHoursMinutes = getHoursMinutes;\nexports.getHoursMinutesSeconds = getHoursMinutesSeconds;\nexports.convert12to24 = convert12to24;\nexports.convert24to12 = convert24to12;\nObject.defineProperty(exports, \"getHours\", {\n  enumerable: true,\n  get: function get() {\n    return _dates.getHours;\n  }\n});\nObject.defineProperty(exports, \"getMinutes\", {\n  enumerable: true,\n  get: function get() {\n    return _dates.getMinutes;\n  }\n});\nObject.defineProperty(exports, \"getSeconds\", {\n  enumerable: true,\n  get: function get() {\n    return _dates.getSeconds;\n  }\n});\n\nvar _dates = require(\"react-clock/dist/shared/dates\");\n\nfunction getHoursMinutes(date) {\n  if (!date) {\n    return date;\n  }\n\n  var hours = \"0\".concat((0, _dates.getHours)(date)).slice(-2);\n  var minutes = \"0\".concat((0, _dates.getMinutes)(date)).slice(-2);\n  return \"\".concat(hours, \":\").concat(minutes);\n}\n\nfunction getHoursMinutesSeconds(date) {\n  if (!date) {\n    return date;\n  }\n\n  var hours = \"0\".concat((0, _dates.getHours)(date)).slice(-2);\n  var minutes = \"0\".concat((0, _dates.getMinutes)(date)).slice(-2);\n  var seconds = \"0\".concat((0, _dates.getSeconds)(date)).slice(-2);\n  return \"\".concat(hours, \":\").concat(minutes, \":\").concat(seconds);\n}\n\nfunction convert12to24(hour12, amPm) {\n  var hour24 = parseInt(hour12, 10);\n\n  if (amPm === 'am' && hour24 === 12) {\n    hour24 = 0;\n  } else if (amPm === 'pm' && hour24 < 12) {\n    hour24 += 12;\n  }\n\n  return hour24;\n}\n\nfunction convert24to12(hour24) {\n  var hour12 = hour24 % 12 || 12;\n  return [hour12, hour24 < 12 ? 'am' : 'pm'];\n}","map":null,"metadata":{},"sourceType":"script"}