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tsx","webpack://open-law-org-au-client/./client-config.js","webpack://open-law-org-au-client/../node_modules/@sanity/image-url/lib/browser/image-url.umd.js","webpack://open-law-org-au-client/../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/add_days/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/add_hours/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/add_iso_years/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/add_milliseconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/add_minutes/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/add_months/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/add_quarters/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/add_seconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/add_weeks/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/add_years/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/are_ranges_overlapping/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/closest_index_to/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/closest_to/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/compare_asc/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/compare_desc/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_calendar_days/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_calendar_iso_weeks/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_calendar_iso_years/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_calendar_months/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_calendar_quarters/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_calendar_weeks/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_calendar_years/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_days/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_hours/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_iso_years/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_milliseconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_minutes/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_months/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_quarters/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_seconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_weeks/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/difference_in_years/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/distance_in_words/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/distance_in_words_strict/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/distance_in_words_to_now/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/each_day/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_day/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_hour/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_iso_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_iso_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_minute/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_month/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_quarter/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_second/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_today/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_tomorrow/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/end_of_yesterday/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/format/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_date/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_day/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_day_of_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_days_in_month/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_days_in_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_hours/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_iso_day/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_iso_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_iso_weeks_in_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_iso_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_milliseconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_minutes/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_month/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_overlapping_days_in_ranges/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_quarter/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_seconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_time/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/get_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_after/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_before/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_date/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_equal/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_first_day_of_month/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_friday/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_future/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_last_day_of_month/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_leap_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_monday/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_past/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_same_day/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_same_hour/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_same_iso_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_same_iso_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_same_minute/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_same_month/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_same_quarter/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_same_second/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_same_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_same_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_saturday/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_sunday/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_this_hour/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_this_iso_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_this_iso_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_this_minute/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_this_month/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_this_quarter/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_this_second/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_this_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_this_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_thursday/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_today/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_tomorrow/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_tuesday/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_valid/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_wednesday/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_weekend/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_within_range/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/is_yesterday/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/last_day_of_iso_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/last_day_of_iso_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/last_day_of_month/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/last_day_of_quarter/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/last_day_of_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/last_day_of_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/locale/en/build_format_locale/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/locale/en/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/max/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/min/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/parse/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_date/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_day/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_day_of_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_hours/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_iso_day/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_iso_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_iso_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_milliseconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_minutes/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_month/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_quarter/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_seconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/set_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_day/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_hour/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_iso_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_iso_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_minute/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_month/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_quarter/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_second/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_today/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_tomorrow/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_week/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_year/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/start_of_yesterday/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/sub_days/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/sub_hours/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/sub_iso_years/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/sub_milliseconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/sub_minutes/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/sub_months/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/sub_quarters/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/sub_seconds/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/sub_weeks/index.js","webpack://open-law-org-au-client/../node_modules/date-fns/sub_years/index.js"],"sourcesContent":["import {isFuture} from 'date-fns'\nimport {DateTime} from \"luxon\";\n\nexport function cn(...args) {\n return args.filter(Boolean).join(' ')\n}\n\nexport function mapEdgesToNodes(data) {\n if (!data.edges) return []\n return data.edges.map(edge => edge.node)\n}\n\nexport function filterOutDocsWithoutSlugs({slug}) {\n return (slug || {}).current\n}\n\nexport function filterOutDocsPublishedInTheFuture({publishedAt}) {\n return !isFuture(publishedAt)\n}\n\nexport function getBlogUrl(slug) {\n return `/blog/${slug.current || slug}/`\n}\n\nexport function buildImageObj(source = {asset: {}}) {\n const imageObj = {\n asset: {_ref: source.asset._ref || source.asset._id}\n }\n\n if (source.crop) imageObj.crop = source.crop\n if (source.hotspot) imageObj.hotspot = source.hotspot\n\n return imageObj\n}\n\nexport function toPlainText(blocks) {\n if (!blocks) {\n return ''\n }\n if (Array.isArray(blocks)) {\n return blocks\n .map(block => {\n if (block._type !== 'block' || !block.children) {\n return ''\n }\n return block.children.map(child => child.text).join('')\n })\n .join('\\n\\n')\n }\n}\n\nexport function utcTimeStringToDate(utc: string): string {\n try {\n const date = new Date(utc)\n return `${date.getDate()}/${date.getMonth() + 1}/${date.getFullYear()}`\n } catch (e) {\n console.error('Issue parsing date')\n return ''\n }\n}\n\nexport function utcTimeStringToDateTime(utc: string): string {\n try {\n const date = new Date(utc)\n return `${date.getDate()}/${date.getMonth() + 1}/${date.getFullYear()} at ${date.getHours()}:${date.getMinutes()}`\n } catch (e) {\n console.error('Issue parsing date')\n return ''\n }\n}\n\nexport function utcTimeStringtoTimeWords(utc:string): string {\n try{\n return DateTime.fromJSDate(new Date(utc))\n .toFormat('h:ma')\n // .toLocaleString(DateTime.DATETIME_HUGE)\n } catch (e) {\n console.error('Issue parsing date')\n return ''\n }\n}\n\nexport function utcTimeStringtoDateWords(utc:string): string {\n try{\n return DateTime.fromJSDate(new Date(utc))\n .toFormat('EEEE d LLL y')\n // .toLocaleString(DateTime.DATETIME_HUGE)\n } catch (e) {\n console.error('Issue parsing date')\n return ''\n }\n}\n\nexport function utcTimeStringtoTimeZone(utc:string): string {\n try{\n return DateTime.fromJSDate(new Date(utc))\n .toFormat('ZZZZZ')\n // .toLocaleString(DateTime.DATETIME_HUGE)\n } catch (e) {\n console.error('Issue parsing date')\n return ''\n }\n}\n\nexport function jsDateToDdMmYyyy(date: Date): string {\n if (date) {\n return `${date.getDate()}/${date.getMonth() + 1}/${date.getFullYear()}`\n }\n return ''\n}\n","import clientConfig from '../../client-config'\nimport imageUrlBuilder from '@sanity/image-url'\n\nconst builder = imageUrlBuilder(clientConfig.sanity)\n\nexport function imageUrlFor (source) {\n return builder.image(source)\n}\n","module.exports = {\n sanity: {\n projectId: process.env.GATSBY_SANITY_PROJECT_ID || \"81k3cw4t\",\n dataset: process.env.GATSBY_SANITY_DATASET || \"production\"\n }\n};\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, global.SanityImageUrlBuilder = factory());\n})(this, function () {\n function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n\n function _createForOfIteratorHelperLoose(o) {\n var i = 0;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n i = o[Symbol.iterator]();\n return i.next.bind(i);\n }\n\n var example = 'image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg';\n\n function parseAssetId(ref) {\n var _ref$split = ref.split('-'),\n id = _ref$split[1],\n dimensionString = _ref$split[2],\n format = _ref$split[3];\n\n if (!id || !dimensionString || !format) {\n throw new Error(\"Malformed asset _ref '\" + ref + \"'. Expected an id like \\\"\" + example + \"\\\".\");\n }\n\n var _dimensionString$spli = dimensionString.split('x'),\n imgWidthStr = _dimensionString$spli[0],\n imgHeightStr = _dimensionString$spli[1];\n\n var width = +imgWidthStr;\n var height = +imgHeightStr;\n var isValidAssetId = isFinite(width) && isFinite(height);\n\n if (!isValidAssetId) {\n throw new Error(\"Malformed asset _ref '\" + ref + \"'. Expected an id like \\\"\" + example + \"\\\".\");\n }\n\n return {\n id: id,\n width: width,\n height: height,\n format: format\n };\n }\n\n var isRef = function isRef(src) {\n var source = src;\n return source ? typeof source._ref === 'string' : false;\n };\n\n var isAsset = function isAsset(src) {\n var source = src;\n return source ? typeof source._id === 'string' : false;\n };\n\n var isAssetStub = function isAssetStub(src) {\n var source = src;\n return source && source.asset ? typeof source.asset.url === 'string' : false;\n };\n\n function parseSource(source) {\n if (!source) {\n return null;\n }\n\n var image;\n\n if (typeof source === 'string' && isUrl(source)) {\n image = {\n asset: {\n _ref: urlToId(source)\n }\n };\n } else if (typeof source === 'string') {\n image = {\n asset: {\n _ref: source\n }\n };\n } else if (isRef(source)) {\n image = {\n asset: source\n };\n } else if (isAsset(source)) {\n image = {\n asset: {\n _ref: source._id || ''\n }\n };\n } else if (isAssetStub(source)) {\n image = {\n asset: {\n _ref: urlToId(source.asset.url)\n }\n };\n } else if (typeof source.asset === 'object') {\n image = source;\n } else {\n return null;\n }\n\n var img = source;\n\n if (img.crop) {\n image.crop = img.crop;\n }\n\n if (img.hotspot) {\n image.hotspot = img.hotspot;\n }\n\n return applyDefaults(image);\n }\n\n function isUrl(url) {\n return /^https?:\\/\\//.test(\"\" + url);\n }\n\n function urlToId(url) {\n var parts = url.split('/').slice(-1);\n return (\"image-\" + parts[0]).replace(/\\.([a-z]+)$/, '-$1');\n }\n\n function applyDefaults(image) {\n if (image.crop && image.hotspot) {\n return image;\n }\n\n var result = _extends({}, image);\n\n if (!result.crop) {\n result.crop = {\n left: 0,\n top: 0,\n bottom: 0,\n right: 0\n };\n }\n\n if (!result.hotspot) {\n result.hotspot = {\n x: 0.5,\n y: 0.5,\n height: 1.0,\n width: 1.0\n };\n }\n\n return result;\n }\n\n var SPEC_NAME_TO_URL_NAME_MAPPINGS = [['width', 'w'], ['height', 'h'], ['format', 'fm'], ['download', 'dl'], ['blur', 'blur'], ['sharpen', 'sharp'], ['invert', 'invert'], ['orientation', 'or'], ['minHeight', 'min-h'], ['maxHeight', 'max-h'], ['minWidth', 'min-w'], ['maxWidth', 'max-w'], ['quality', 'q'], ['fit', 'fit'], ['crop', 'crop'], ['saturation', 'sat'], ['auto', 'auto'], ['dpr', 'dpr'], ['pad', 'pad']];\n\n function urlForImage(options) {\n var spec = _extends({}, options || {});\n\n var source = spec.source;\n delete spec.source;\n var image = parseSource(source);\n\n if (!image) {\n return null;\n }\n\n var id = image.asset._ref || image.asset._id || '';\n var asset = parseAssetId(id);\n var cropLeft = Math.round(image.crop.left * asset.width);\n var cropTop = Math.round(image.crop.top * asset.height);\n var crop = {\n left: cropLeft,\n top: cropTop,\n width: Math.round(asset.width - image.crop.right * asset.width - cropLeft),\n height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)\n };\n var hotSpotVerticalRadius = image.hotspot.height * asset.height / 2;\n var hotSpotHorizontalRadius = image.hotspot.width * asset.width / 2;\n var hotSpotCenterX = image.hotspot.x * asset.width;\n var hotSpotCenterY = image.hotspot.y * asset.height;\n var hotspot = {\n left: hotSpotCenterX - hotSpotHorizontalRadius,\n top: hotSpotCenterY - hotSpotVerticalRadius,\n right: hotSpotCenterX + hotSpotHorizontalRadius,\n bottom: hotSpotCenterY + hotSpotVerticalRadius\n };\n\n if (!(spec.rect || spec.focalPoint || spec.ignoreImageParams || spec.crop)) {\n spec = _extends(_extends({}, spec), fit({\n crop: crop,\n hotspot: hotspot\n }, spec));\n }\n\n return specToImageUrl(_extends(_extends({}, spec), {}, {\n asset: asset\n }));\n }\n\n function specToImageUrl(spec) {\n var cdnUrl = spec.baseUrl || 'https://cdn.sanity.io';\n var filename = spec.asset.id + \"-\" + spec.asset.width + \"x\" + spec.asset.height + \".\" + spec.asset.format;\n var baseUrl = cdnUrl + \"/images/\" + spec.projectId + \"/\" + spec.dataset + \"/\" + filename;\n var params = [];\n\n if (spec.rect) {\n var _spec$rect = spec.rect,\n left = _spec$rect.left,\n top = _spec$rect.top,\n width = _spec$rect.width,\n height = _spec$rect.height;\n var isEffectiveCrop = left !== 0 || top !== 0 || height !== spec.asset.height || width !== spec.asset.width;\n\n if (isEffectiveCrop) {\n params.push(\"rect=\" + left + \",\" + top + \",\" + width + \",\" + height);\n }\n }\n\n if (spec.bg) {\n params.push(\"bg=\" + spec.bg);\n }\n\n if (spec.focalPoint) {\n params.push(\"fp-x=\" + spec.focalPoint.x);\n params.push(\"fp-y=\" + spec.focalPoint.y);\n }\n\n var flip = [spec.flipHorizontal && 'h', spec.flipVertical && 'v'].filter(Boolean).join('');\n\n if (flip) {\n params.push(\"flip=\" + flip);\n }\n\n SPEC_NAME_TO_URL_NAME_MAPPINGS.forEach(function (mapping) {\n var specName = mapping[0],\n param = mapping[1];\n\n if (typeof spec[specName] !== 'undefined') {\n params.push(param + \"=\" + encodeURIComponent(spec[specName]));\n } else if (typeof spec[param] !== 'undefined') {\n params.push(param + \"=\" + encodeURIComponent(spec[param]));\n }\n });\n\n if (params.length === 0) {\n return baseUrl;\n }\n\n return baseUrl + \"?\" + params.join('&');\n }\n\n function fit(source, spec) {\n var cropRect;\n var imgWidth = spec.width;\n var imgHeight = spec.height;\n\n if (!(imgWidth && imgHeight)) {\n return {\n width: imgWidth,\n height: imgHeight,\n rect: source.crop\n };\n }\n\n var crop = source.crop;\n var hotspot = source.hotspot;\n var desiredAspectRatio = imgWidth / imgHeight;\n var cropAspectRatio = crop.width / crop.height;\n\n if (cropAspectRatio > desiredAspectRatio) {\n var height = crop.height;\n var width = height * desiredAspectRatio;\n var top = crop.top;\n var hotspotXCenter = (hotspot.right - hotspot.left) / 2 + hotspot.left;\n var left = hotspotXCenter - width / 2;\n\n if (left < crop.left) {\n left = crop.left;\n } else if (left + width > crop.left + crop.width) {\n left = crop.left + crop.width - width;\n }\n\n cropRect = {\n left: Math.round(left),\n top: Math.round(top),\n width: Math.round(width),\n height: Math.round(height)\n };\n } else {\n var _width = crop.width;\n\n var _height = _width / desiredAspectRatio;\n\n var _left = crop.left;\n var hotspotYCenter = (hotspot.bottom - hotspot.top) / 2 + hotspot.top;\n\n var _top = hotspotYCenter - _height / 2;\n\n if (_top < crop.top) {\n _top = crop.top;\n } else if (_top + _height > crop.top + crop.height) {\n _top = crop.top + crop.height - _height;\n }\n\n cropRect = {\n left: Math.max(0, Math.floor(_left)),\n top: Math.max(0, Math.floor(_top)),\n width: Math.round(_width),\n height: Math.round(_height)\n };\n }\n\n return {\n width: imgWidth,\n height: imgHeight,\n rect: cropRect\n };\n }\n\n var validFits = ['clip', 'crop', 'fill', 'fillmax', 'max', 'scale', 'min'];\n var validCrops = ['top', 'bottom', 'left', 'right', 'center', 'focalpoint', 'entropy'];\n var validAutoModes = ['format'];\n\n function isSanityClientLike(client) {\n return client ? typeof client.clientConfig === 'object' : false;\n }\n\n function rewriteSpecName(key) {\n var specs = SPEC_NAME_TO_URL_NAME_MAPPINGS;\n\n for (var _iterator = _createForOfIteratorHelperLoose(specs), _step; !(_step = _iterator()).done;) {\n var entry = _step.value;\n var specName = entry[0],\n param = entry[1];\n\n if (key === specName || key === param) {\n return specName;\n }\n }\n\n return key;\n }\n\n function urlBuilder(options) {\n var client = options;\n\n if (isSanityClientLike(client)) {\n var _client$clientConfig = client.clientConfig,\n apiUrl = _client$clientConfig.apiHost,\n projectId = _client$clientConfig.projectId,\n dataset = _client$clientConfig.dataset;\n var apiHost = apiUrl || 'https://api.sanity.io';\n return new ImageUrlBuilder(null, {\n baseUrl: apiHost.replace(/^https:\\/\\/api\\./, 'https://cdn.'),\n projectId: projectId,\n dataset: dataset\n });\n }\n\n return new ImageUrlBuilder(null, options);\n }\n\n var ImageUrlBuilder = /*#__PURE__*/function () {\n function ImageUrlBuilder(parent, options) {\n this.options = parent ? _extends(_extends({}, parent.options || {}), options || {}) : _extends({}, options || {});\n }\n\n var _proto = ImageUrlBuilder.prototype;\n\n _proto.withOptions = function withOptions(options) {\n var baseUrl = options.baseUrl || this.options.baseUrl;\n var newOptions = {\n baseUrl: baseUrl\n };\n\n for (var key in options) {\n if (options.hasOwnProperty(key)) {\n var specKey = rewriteSpecName(key);\n newOptions[specKey] = options[key];\n }\n }\n\n return new ImageUrlBuilder(this, _extends({\n baseUrl: baseUrl\n }, newOptions));\n };\n\n _proto.image = function image(source) {\n return this.withOptions({\n source: source\n });\n };\n\n _proto.dataset = function dataset(_dataset) {\n return this.withOptions({\n dataset: _dataset\n });\n };\n\n _proto.projectId = function projectId(_projectId) {\n return this.withOptions({\n projectId: _projectId\n });\n };\n\n _proto.bg = function bg(_bg) {\n return this.withOptions({\n bg: _bg\n });\n };\n\n _proto.dpr = function dpr(_dpr) {\n return this.withOptions({\n dpr: _dpr\n });\n };\n\n _proto.width = function width(_width) {\n return this.withOptions({\n width: _width\n });\n };\n\n _proto.height = function height(_height) {\n return this.withOptions({\n height: _height\n });\n };\n\n _proto.focalPoint = function focalPoint(x, y) {\n return this.withOptions({\n focalPoint: {\n x: x,\n y: y\n }\n });\n };\n\n _proto.maxWidth = function maxWidth(_maxWidth) {\n return this.withOptions({\n maxWidth: _maxWidth\n });\n };\n\n _proto.minWidth = function minWidth(_minWidth) {\n return this.withOptions({\n minWidth: _minWidth\n });\n };\n\n _proto.maxHeight = function maxHeight(_maxHeight) {\n return this.withOptions({\n maxHeight: _maxHeight\n });\n };\n\n _proto.minHeight = function minHeight(_minHeight) {\n return this.withOptions({\n minHeight: _minHeight\n });\n };\n\n _proto.size = function size(width, height) {\n return this.withOptions({\n width: width,\n height: height\n });\n };\n\n _proto.blur = function blur(_blur) {\n return this.withOptions({\n blur: _blur\n });\n };\n\n _proto.sharpen = function sharpen(_sharpen) {\n return this.withOptions({\n sharpen: _sharpen\n });\n };\n\n _proto.rect = function rect(left, top, width, height) {\n return this.withOptions({\n rect: {\n left: left,\n top: top,\n width: width,\n height: height\n }\n });\n };\n\n _proto.format = function format(_format) {\n return this.withOptions({\n format: _format\n });\n };\n\n _proto.invert = function invert(_invert) {\n return this.withOptions({\n invert: _invert\n });\n };\n\n _proto.orientation = function orientation(_orientation) {\n return this.withOptions({\n orientation: _orientation\n });\n };\n\n _proto.quality = function quality(_quality) {\n return this.withOptions({\n quality: _quality\n });\n };\n\n _proto.forceDownload = function forceDownload(download) {\n return this.withOptions({\n download: download\n });\n };\n\n _proto.flipHorizontal = function flipHorizontal() {\n return this.withOptions({\n flipHorizontal: true\n });\n };\n\n _proto.flipVertical = function flipVertical() {\n return this.withOptions({\n flipVertical: true\n });\n };\n\n _proto.ignoreImageParams = function ignoreImageParams() {\n return this.withOptions({\n ignoreImageParams: true\n });\n };\n\n _proto.fit = function fit(value) {\n if (validFits.indexOf(value) === -1) {\n throw new Error(\"Invalid fit mode \\\"\" + value + \"\\\"\");\n }\n\n return this.withOptions({\n fit: value\n });\n };\n\n _proto.crop = function crop(value) {\n if (validCrops.indexOf(value) === -1) {\n throw new Error(\"Invalid crop mode \\\"\" + value + \"\\\"\");\n }\n\n return this.withOptions({\n crop: value\n });\n };\n\n _proto.saturation = function saturation(_saturation) {\n return this.withOptions({\n saturation: _saturation\n });\n };\n\n _proto.auto = function auto(value) {\n if (validAutoModes.indexOf(value) === -1) {\n throw new Error(\"Invalid auto mode \\\"\" + value + \"\\\"\");\n }\n\n return this.withOptions({\n auto: value\n });\n };\n\n _proto.pad = function pad(_pad) {\n return this.withOptions({\n pad: _pad\n });\n };\n\n _proto.url = function url() {\n return urlForImage(this.options);\n };\n\n _proto.toString = function toString() {\n return this.url();\n };\n\n return ImageUrlBuilder;\n }();\n\n return urlBuilder;\n});","var MILLISECONDS_IN_MINUTE = 60000;\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\n\nmodule.exports = function getTimezoneOffsetInMilliseconds(dirtyDate) {\n var date = new Date(dirtyDate.getTime());\n var baseTimezoneOffset = date.getTimezoneOffset();\n date.setSeconds(0, 0);\n var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE;\n return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset;\n};","var parse = require('../parse/index.js');\n/**\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added\n * @returns {Date} the new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * var result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\n\nfunction addDays(dirtyDate, dirtyAmount) {\n var date = parse(dirtyDate);\n var amount = Number(dirtyAmount);\n date.setDate(date.getDate() + amount);\n return date;\n}\n\nmodule.exports = addDays;","var addMilliseconds = require('../add_milliseconds/index.js');\n\nvar MILLISECONDS_IN_HOUR = 3600000;\n/**\n * @category Hour Helpers\n * @summary Add the specified number of hours to the given date.\n *\n * @description\n * Add the specified number of hours to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of hours to be added\n * @returns {Date} the new date with the hours added\n *\n * @example\n * // Add 2 hours to 10 July 2014 23:00:00:\n * var result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n * //=> Fri Jul 11 2014 01:00:00\n */\n\nfunction addHours(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_HOUR);\n}\n\nmodule.exports = addHours;","var getISOYear = require('../get_iso_year/index.js');\n\nvar setISOYear = require('../set_iso_year/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Add the specified number of ISO week-numbering years to the given date.\n *\n * @description\n * Add the specified number of ISO week-numbering years to the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of ISO week-numbering years to be added\n * @returns {Date} the new date with the ISO week-numbering years added\n *\n * @example\n * // Add 5 ISO week-numbering years to 2 July 2010:\n * var result = addISOYears(new Date(2010, 6, 2), 5)\n * //=> Fri Jun 26 2015 00:00:00\n */\n\n\nfunction addISOYears(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return setISOYear(dirtyDate, getISOYear(dirtyDate) + amount);\n}\n\nmodule.exports = addISOYears;","var parse = require('../parse/index.js');\n/**\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added\n * @returns {Date} the new date with the milliseconds added\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * var result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\n\nfunction addMilliseconds(dirtyDate, dirtyAmount) {\n var timestamp = parse(dirtyDate).getTime();\n var amount = Number(dirtyAmount);\n return new Date(timestamp + amount);\n}\n\nmodule.exports = addMilliseconds;","var addMilliseconds = require('../add_milliseconds/index.js');\n\nvar MILLISECONDS_IN_MINUTE = 60000;\n/**\n * @category Minute Helpers\n * @summary Add the specified number of minutes to the given date.\n *\n * @description\n * Add the specified number of minutes to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be added\n * @returns {Date} the new date with the minutes added\n *\n * @example\n * // Add 30 minutes to 10 July 2014 12:00:00:\n * var result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 12:30:00\n */\n\nfunction addMinutes(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_MINUTE);\n}\n\nmodule.exports = addMinutes;","var parse = require('../parse/index.js');\n\nvar getDaysInMonth = require('../get_days_in_month/index.js');\n/**\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added\n * @returns {Date} the new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * var result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\n\nfunction addMonths(dirtyDate, dirtyAmount) {\n var date = parse(dirtyDate);\n var amount = Number(dirtyAmount);\n var desiredMonth = date.getMonth() + amount;\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(date.getFullYear(), desiredMonth, 1);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(desiredMonth, Math.min(daysInMonth, date.getDate()));\n return date;\n}\n\nmodule.exports = addMonths;","var addMonths = require('../add_months/index.js');\n/**\n * @category Quarter Helpers\n * @summary Add the specified number of year quarters to the given date.\n *\n * @description\n * Add the specified number of year quarters to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of quarters to be added\n * @returns {Date} the new date with the quarters added\n *\n * @example\n * // Add 1 quarter to 1 September 2014:\n * var result = addQuarters(new Date(2014, 8, 1), 1)\n * //=> Mon Dec 01 2014 00:00:00\n */\n\n\nfunction addQuarters(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n var months = amount * 3;\n return addMonths(dirtyDate, months);\n}\n\nmodule.exports = addQuarters;","var addMilliseconds = require('../add_milliseconds/index.js');\n/**\n * @category Second Helpers\n * @summary Add the specified number of seconds to the given date.\n *\n * @description\n * Add the specified number of seconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of seconds to be added\n * @returns {Date} the new date with the seconds added\n *\n * @example\n * // Add 30 seconds to 10 July 2014 12:45:00:\n * var result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n * //=> Thu Jul 10 2014 12:45:30\n */\n\n\nfunction addSeconds(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addMilliseconds(dirtyDate, amount * 1000);\n}\n\nmodule.exports = addSeconds;","var addDays = require('../add_days/index.js');\n/**\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added\n * @returns {Date} the new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * var result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\n\n\nfunction addWeeks(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n var days = amount * 7;\n return addDays(dirtyDate, days);\n}\n\nmodule.exports = addWeeks;","var addMonths = require('../add_months/index.js');\n/**\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added\n * @returns {Date} the new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * var result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\n\nfunction addYears(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}\n\nmodule.exports = addYears;","var parse = require('../parse/index.js');\n/**\n * @category Range Helpers\n * @summary Is the given date range overlapping with another date range?\n *\n * @description\n * Is the given date range overlapping with another date range?\n *\n * @param {Date|String|Number} initialRangeStartDate - the start of the initial range\n * @param {Date|String|Number} initialRangeEndDate - the end of the initial range\n * @param {Date|String|Number} comparedRangeStartDate - the start of the range to compare it with\n * @param {Date|String|Number} comparedRangeEndDate - the end of the range to compare it with\n * @returns {Boolean} whether the date ranges are overlapping\n * @throws {Error} startDate of a date range cannot be after its endDate\n *\n * @example\n * // For overlapping date ranges:\n * areRangesOverlapping(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 17), new Date(2014, 0, 21)\n * )\n * //=> true\n *\n * @example\n * // For non-overlapping date ranges:\n * areRangesOverlapping(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 21), new Date(2014, 0, 22)\n * )\n * //=> false\n */\n\n\nfunction areRangesOverlapping(dirtyInitialRangeStartDate, dirtyInitialRangeEndDate, dirtyComparedRangeStartDate, dirtyComparedRangeEndDate) {\n var initialStartTime = parse(dirtyInitialRangeStartDate).getTime();\n var initialEndTime = parse(dirtyInitialRangeEndDate).getTime();\n var comparedStartTime = parse(dirtyComparedRangeStartDate).getTime();\n var comparedEndTime = parse(dirtyComparedRangeEndDate).getTime();\n\n if (initialStartTime > initialEndTime || comparedStartTime > comparedEndTime) {\n throw new Error('The start of the range cannot be after the end of the range');\n }\n\n return initialStartTime < comparedEndTime && comparedStartTime < initialEndTime;\n}\n\nmodule.exports = areRangesOverlapping;","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Return an index of the closest date from the array comparing to the given date.\n *\n * @description\n * Return an index of the closest date from the array comparing to the given date.\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date[]|String[]|Number[]} datesArray - the array to search\n * @returns {Number} an index of the date closest to the given date\n * @throws {TypeError} the second argument must be an instance of Array\n *\n * @example\n * // Which date is closer to 6 September 2015?\n * var dateToCompare = new Date(2015, 8, 6)\n * var datesArray = [\n * new Date(2015, 0, 1),\n * new Date(2016, 0, 1),\n * new Date(2017, 0, 1)\n * ]\n * var result = closestIndexTo(dateToCompare, datesArray)\n * //=> 1\n */\n\n\nfunction closestIndexTo(dirtyDateToCompare, dirtyDatesArray) {\n if (!(dirtyDatesArray instanceof Array)) {\n throw new TypeError(toString.call(dirtyDatesArray) + ' is not an instance of Array');\n }\n\n var dateToCompare = parse(dirtyDateToCompare);\n var timeToCompare = dateToCompare.getTime();\n var result;\n var minDistance;\n dirtyDatesArray.forEach(function (dirtyDate, index) {\n var currentDate = parse(dirtyDate);\n var distance = Math.abs(timeToCompare - currentDate.getTime());\n\n if (result === undefined || distance < minDistance) {\n result = index;\n minDistance = distance;\n }\n });\n return result;\n}\n\nmodule.exports = closestIndexTo;","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Return a date from the array closest to the given date.\n *\n * @description\n * Return a date from the array closest to the given date.\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date[]|String[]|Number[]} datesArray - the array to search\n * @returns {Date} the date from the array closest to the given date\n * @throws {TypeError} the second argument must be an instance of Array\n *\n * @example\n * // Which date is closer to 6 September 2015: 1 January 2000 or 1 January 2030?\n * var dateToCompare = new Date(2015, 8, 6)\n * var result = closestTo(dateToCompare, [\n * new Date(2000, 0, 1),\n * new Date(2030, 0, 1)\n * ])\n * //=> Tue Jan 01 2030 00:00:00\n */\n\n\nfunction closestTo(dirtyDateToCompare, dirtyDatesArray) {\n if (!(dirtyDatesArray instanceof Array)) {\n throw new TypeError(toString.call(dirtyDatesArray) + ' is not an instance of Array');\n }\n\n var dateToCompare = parse(dirtyDateToCompare);\n var timeToCompare = dateToCompare.getTime();\n var result;\n var minDistance;\n dirtyDatesArray.forEach(function (dirtyDate) {\n var currentDate = parse(dirtyDate);\n var distance = Math.abs(timeToCompare - currentDate.getTime());\n\n if (result === undefined || distance < minDistance) {\n result = currentDate;\n minDistance = distance;\n }\n });\n return result;\n}\n\nmodule.exports = closestTo;","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * var result = compareAsc(\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * )\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * var result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\n\n\nfunction compareAsc(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var timeLeft = dateLeft.getTime();\n var dateRight = parse(dirtyDateRight);\n var timeRight = dateRight.getTime();\n\n if (timeLeft < timeRight) {\n return -1;\n } else if (timeLeft > timeRight) {\n return 1;\n } else {\n return 0;\n }\n}\n\nmodule.exports = compareAsc;","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Compare the two dates reverse chronologically and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return -1 if the first date is after the second,\n * 1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989 reverse chronologically:\n * var result = compareDesc(\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * )\n * //=> 1\n *\n * @example\n * // Sort the array of dates in reverse chronological order:\n * var result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareDesc)\n * //=> [\n * // Sun Jul 02 1995 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Wed Feb 11 1987 00:00:00\n * // ]\n */\n\n\nfunction compareDesc(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var timeLeft = dateLeft.getTime();\n var dateRight = parse(dirtyDateRight);\n var timeRight = dateRight.getTime();\n\n if (timeLeft > timeRight) {\n return -1;\n } else if (timeLeft < timeRight) {\n return 1;\n } else {\n return 0;\n }\n}\n\nmodule.exports = compareDesc;","var startOfDay = require('../start_of_day/index.js');\n\nvar MILLISECONDS_IN_MINUTE = 60000;\nvar MILLISECONDS_IN_DAY = 86400000;\n/**\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * var result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n */\n\nfunction differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) {\n var startOfDayLeft = startOfDay(dirtyDateLeft);\n var startOfDayRight = startOfDay(dirtyDateRight);\n var timestampLeft = startOfDayLeft.getTime() - startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE;\n var timestampRight = startOfDayRight.getTime() - startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE; // Round the number of days to the nearest integer\n // because the number of milliseconds in a day is not constant\n // (e.g. it's different in the day of the daylight saving time clock shift)\n\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY);\n}\n\nmodule.exports = differenceInCalendarDays;","var startOfISOWeek = require('../start_of_iso_week/index.js');\n\nvar MILLISECONDS_IN_MINUTE = 60000;\nvar MILLISECONDS_IN_WEEK = 604800000;\n/**\n * @category ISO Week Helpers\n * @summary Get the number of calendar ISO weeks between the given dates.\n *\n * @description\n * Get the number of calendar ISO weeks between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar ISO weeks\n *\n * @example\n * // How many calendar ISO weeks are between 6 July 2014 and 21 July 2014?\n * var result = differenceInCalendarISOWeeks(\n * new Date(2014, 6, 21),\n * new Date(2014, 6, 6)\n * )\n * //=> 3\n */\n\nfunction differenceInCalendarISOWeeks(dirtyDateLeft, dirtyDateRight) {\n var startOfISOWeekLeft = startOfISOWeek(dirtyDateLeft);\n var startOfISOWeekRight = startOfISOWeek(dirtyDateRight);\n var timestampLeft = startOfISOWeekLeft.getTime() - startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE;\n var timestampRight = startOfISOWeekRight.getTime() - startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE; // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK);\n}\n\nmodule.exports = differenceInCalendarISOWeeks;","var getISOYear = require('../get_iso_year/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of calendar ISO week-numbering years between the given dates.\n *\n * @description\n * Get the number of calendar ISO week-numbering years between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar ISO week-numbering years\n *\n * @example\n * // How many calendar ISO week-numbering years are 1 January 2010 and 1 January 2012?\n * var result = differenceInCalendarISOYears(\n * new Date(2012, 0, 1),\n * new Date(2010, 0, 1)\n * )\n * //=> 2\n */\n\n\nfunction differenceInCalendarISOYears(dirtyDateLeft, dirtyDateRight) {\n return getISOYear(dirtyDateLeft) - getISOYear(dirtyDateRight);\n}\n\nmodule.exports = differenceInCalendarISOYears;","var parse = require('../parse/index.js');\n/**\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\n\n\nfunction differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var dateRight = parse(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}\n\nmodule.exports = differenceInCalendarMonths;","var getQuarter = require('../get_quarter/index.js');\n\nvar parse = require('../parse/index.js');\n/**\n * @category Quarter Helpers\n * @summary Get the number of calendar quarters between the given dates.\n *\n * @description\n * Get the number of calendar quarters between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar quarters\n *\n * @example\n * // How many calendar quarters are between 31 December 2013 and 2 July 2014?\n * var result = differenceInCalendarQuarters(\n * new Date(2014, 6, 2),\n * new Date(2013, 11, 31)\n * )\n * //=> 3\n */\n\n\nfunction differenceInCalendarQuarters(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var dateRight = parse(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var quarterDiff = getQuarter(dateLeft) - getQuarter(dateRight);\n return yearDiff * 4 + quarterDiff;\n}\n\nmodule.exports = differenceInCalendarQuarters;","var startOfWeek = require('../start_of_week/index.js');\n\nvar MILLISECONDS_IN_MINUTE = 60000;\nvar MILLISECONDS_IN_WEEK = 604800000;\n/**\n * @category Week Helpers\n * @summary Get the number of calendar weeks between the given dates.\n *\n * @description\n * Get the number of calendar weeks between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Number} the number of calendar weeks\n *\n * @example\n * // How many calendar weeks are between 5 July 2014 and 20 July 2014?\n * var result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5)\n * )\n * //=> 3\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks are between 5 July 2014 and 20 July 2014?\n * var result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5),\n * {weekStartsOn: 1}\n * )\n * //=> 2\n */\n\nfunction differenceInCalendarWeeks(dirtyDateLeft, dirtyDateRight, dirtyOptions) {\n var startOfWeekLeft = startOfWeek(dirtyDateLeft, dirtyOptions);\n var startOfWeekRight = startOfWeek(dirtyDateRight, dirtyOptions);\n var timestampLeft = startOfWeekLeft.getTime() - startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE;\n var timestampRight = startOfWeekRight.getTime() - startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE; // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK);\n}\n\nmodule.exports = differenceInCalendarWeeks;","var parse = require('../parse/index.js');\n/**\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar years\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * var result = differenceInCalendarYears(\n * new Date(2015, 1, 11),\n * new Date(2013, 11, 31)\n * )\n * //=> 2\n */\n\n\nfunction differenceInCalendarYears(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var dateRight = parse(dirtyDateRight);\n return dateLeft.getFullYear() - dateRight.getFullYear();\n}\n\nmodule.exports = differenceInCalendarYears;","var parse = require('../parse/index.js');\n\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js');\n\nvar compareAsc = require('../compare_asc/index.js');\n/**\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full days between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full days\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * var result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n */\n\n\nfunction differenceInDays(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var dateRight = parse(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight));\n dateLeft.setDate(dateLeft.getDate() - sign * difference); // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastDayNotFull = compareAsc(dateLeft, dateRight) === -sign;\n return sign * (difference - isLastDayNotFull);\n}\n\nmodule.exports = differenceInDays;","var differenceInMilliseconds = require('../difference_in_milliseconds/index.js');\n\nvar MILLISECONDS_IN_HOUR = 3600000;\n/**\n * @category Hour Helpers\n * @summary Get the number of hours between the given dates.\n *\n * @description\n * Get the number of hours between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of hours\n *\n * @example\n * // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?\n * var result = differenceInHours(\n * new Date(2014, 6, 2, 19, 0),\n * new Date(2014, 6, 2, 6, 50)\n * )\n * //=> 12\n */\n\nfunction differenceInHours(dirtyDateLeft, dirtyDateRight) {\n var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR;\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff);\n}\n\nmodule.exports = differenceInHours;","var parse = require('../parse/index.js');\n\nvar differenceInCalendarISOYears = require('../difference_in_calendar_iso_years/index.js');\n\nvar compareAsc = require('../compare_asc/index.js');\n\nvar subISOYears = require('../sub_iso_years/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of full ISO week-numbering years between the given dates.\n *\n * @description\n * Get the number of full ISO week-numbering years between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full ISO week-numbering years\n *\n * @example\n * // How many full ISO week-numbering years are between 1 January 2010 and 1 January 2012?\n * var result = differenceInISOYears(\n * new Date(2012, 0, 1),\n * new Date(2010, 0, 1)\n * )\n * //=> 1\n */\n\n\nfunction differenceInISOYears(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var dateRight = parse(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarISOYears(dateLeft, dateRight));\n dateLeft = subISOYears(dateLeft, sign * difference); // Math.abs(diff in full ISO years - diff in calendar ISO years) === 1\n // if last calendar ISO year is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastISOYearNotFull = compareAsc(dateLeft, dateRight) === -sign;\n return sign * (difference - isLastISOYearNotFull);\n}\n\nmodule.exports = differenceInISOYears;","var parse = require('../parse/index.js');\n/**\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * var result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\n\nfunction differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var dateRight = parse(dirtyDateRight);\n return dateLeft.getTime() - dateRight.getTime();\n}\n\nmodule.exports = differenceInMilliseconds;","var differenceInMilliseconds = require('../difference_in_milliseconds/index.js');\n\nvar MILLISECONDS_IN_MINUTE = 60000;\n/**\n * @category Minute Helpers\n * @summary Get the number of minutes between the given dates.\n *\n * @description\n * Get the number of minutes between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of minutes\n *\n * @example\n * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\n * var result = differenceInMinutes(\n * new Date(2014, 6, 2, 12, 20, 0),\n * new Date(2014, 6, 2, 12, 7, 59)\n * )\n * //=> 12\n */\n\nfunction differenceInMinutes(dirtyDateLeft, dirtyDateRight) {\n var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE;\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff);\n}\n\nmodule.exports = differenceInMinutes;","var parse = require('../parse/index.js');\n\nvar differenceInCalendarMonths = require('../difference_in_calendar_months/index.js');\n\nvar compareAsc = require('../compare_asc/index.js');\n/**\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 7\n */\n\n\nfunction differenceInMonths(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var dateRight = parse(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));\n dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign;\n return sign * (difference - isLastMonthNotFull);\n}\n\nmodule.exports = differenceInMonths;","var differenceInMonths = require('../difference_in_months/index.js');\n/**\n * @category Quarter Helpers\n * @summary Get the number of full quarters between the given dates.\n *\n * @description\n * Get the number of full quarters between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full quarters\n *\n * @example\n * // How many full quarters are between 31 December 2013 and 2 July 2014?\n * var result = differenceInQuarters(\n * new Date(2014, 6, 2),\n * new Date(2013, 11, 31)\n * )\n * //=> 2\n */\n\n\nfunction differenceInQuarters(dirtyDateLeft, dirtyDateRight) {\n var diff = differenceInMonths(dirtyDateLeft, dirtyDateRight) / 3;\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff);\n}\n\nmodule.exports = differenceInQuarters;","var differenceInMilliseconds = require('../difference_in_milliseconds/index.js');\n/**\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * var result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\n\n\nfunction differenceInSeconds(dirtyDateLeft, dirtyDateRight) {\n var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / 1000;\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff);\n}\n\nmodule.exports = differenceInSeconds;","var differenceInDays = require('../difference_in_days/index.js');\n/**\n * @category Week Helpers\n * @summary Get the number of full weeks between the given dates.\n *\n * @description\n * Get the number of full weeks between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full weeks\n *\n * @example\n * // How many full weeks are between 5 July 2014 and 20 July 2014?\n * var result = differenceInWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5)\n * )\n * //=> 2\n */\n\n\nfunction differenceInWeeks(dirtyDateLeft, dirtyDateRight) {\n var diff = differenceInDays(dirtyDateLeft, dirtyDateRight) / 7;\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff);\n}\n\nmodule.exports = differenceInWeeks;","var parse = require('../parse/index.js');\n\nvar differenceInCalendarYears = require('../difference_in_calendar_years/index.js');\n\nvar compareAsc = require('../compare_asc/index.js');\n/**\n * @category Year Helpers\n * @summary Get the number of full years between the given dates.\n *\n * @description\n * Get the number of full years between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full years\n *\n * @example\n * // How many full years are between 31 December 2013 and 11 February 2015?\n * var result = differenceInYears(\n * new Date(2015, 1, 11),\n * new Date(2013, 11, 31)\n * )\n * //=> 1\n */\n\n\nfunction differenceInYears(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var dateRight = parse(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarYears(dateLeft, dateRight));\n dateLeft.setFullYear(dateLeft.getFullYear() - sign * difference); // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastYearNotFull = compareAsc(dateLeft, dateRight) === -sign;\n return sign * (difference - isLastYearNotFull);\n}\n\nmodule.exports = differenceInYears;","var compareDesc = require('../compare_desc/index.js');\n\nvar parse = require('../parse/index.js');\n\nvar differenceInSeconds = require('../difference_in_seconds/index.js');\n\nvar differenceInMonths = require('../difference_in_months/index.js');\n\nvar enLocale = require('../locale/en/index.js');\n\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_TWO_MONTHS = 86400;\n/**\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date|String|Number} date - the other date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the distance in words\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * var result = distanceInWords(\n * new Date(2014, 6, 2),\n * new Date(2015, 0, 1)\n * )\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * var result = distanceInWords(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * var result = distanceInWords(\n * new Date(2016, 0, 1),\n * new Date(2015, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = distanceInWords(\n * new Date(2016, 7, 1),\n * new Date(2015, 0, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\n\nfunction distanceInWords(dirtyDateToCompare, dirtyDate, dirtyOptions) {\n var options = dirtyOptions || {};\n var comparison = compareDesc(dirtyDateToCompare, dirtyDate);\n var locale = options.locale;\n var localize = enLocale.distanceInWords.localize;\n\n if (locale && locale.distanceInWords && locale.distanceInWords.localize) {\n localize = locale.distanceInWords.localize;\n }\n\n var localizeOptions = {\n addSuffix: Boolean(options.addSuffix),\n comparison: comparison\n };\n var dateLeft, dateRight;\n\n if (comparison > 0) {\n dateLeft = parse(dirtyDateToCompare);\n dateRight = parse(dirtyDate);\n } else {\n dateLeft = parse(dirtyDate);\n dateRight = parse(dirtyDateToCompare);\n }\n\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offset = dateRight.getTimezoneOffset() - dateLeft.getTimezoneOffset();\n var minutes = Math.round(seconds / 60) - offset;\n var months; // 0 up to 2 mins\n\n if (minutes < 2) {\n if (options.includeSeconds) {\n if (seconds < 5) {\n return localize('lessThanXSeconds', 5, localizeOptions);\n } else if (seconds < 10) {\n return localize('lessThanXSeconds', 10, localizeOptions);\n } else if (seconds < 20) {\n return localize('lessThanXSeconds', 20, localizeOptions);\n } else if (seconds < 40) {\n return localize('halfAMinute', null, localizeOptions);\n } else if (seconds < 60) {\n return localize('lessThanXMinutes', 1, localizeOptions);\n } else {\n return localize('xMinutes', 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return localize('lessThanXMinutes', 1, localizeOptions);\n } else {\n return localize('xMinutes', minutes, localizeOptions);\n }\n } // 2 mins up to 0.75 hrs\n\n } else if (minutes < 45) {\n return localize('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return localize('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60);\n return localize('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return localize('xDays', 1, localizeOptions); // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY);\n return localize('xDays', days, localizeOptions); // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH);\n return localize('aboutXMonths', months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft); // 2 months up to 12 months\n\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);\n return localize('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12;\n var years = Math.floor(months / 12); // N years up to 1 years 3 months\n\n if (monthsSinceStartOfYear < 3) {\n return localize('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return localize('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months\n } else {\n return localize('almostXYears', years + 1, localizeOptions);\n }\n }\n}\n\nmodule.exports = distanceInWords;","var compareDesc = require('../compare_desc/index.js');\n\nvar parse = require('../parse/index.js');\n\nvar differenceInSeconds = require('../difference_in_seconds/index.js');\n\nvar enLocale = require('../locale/en/index.js');\n\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_YEAR = 525600;\n/**\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `distanceInWords`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result |\n * |------------------------|---------------------|\n * | 0 ... 59 secs | [0..59] seconds |\n * | 1 ... 59 mins | [1..59] minutes |\n * | 1 ... 23 hrs | [1..23] hours |\n * | 1 ... 29 days | [1..29] days |\n * | 1 ... 11 months | [1..11] months |\n * | 1 ... N years | [1..N] years |\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date|String|Number} date - the other date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {'s'|'m'|'h'|'d'|'M'|'Y'} [options.unit] - if specified, will force a unit\n * @param {'floor'|'ceil'|'round'} [options.partialMethod='floor'] - which way to round partial units\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the distance in words\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * var result = distanceInWordsStrict(\n * new Date(2014, 6, 2),\n * new Date(2015, 0, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00?\n * var result = distanceInWordsStrict(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * )\n * //=> '15 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * var result = distanceInWordsStrict(\n * new Date(2016, 0, 1),\n * new Date(2015, 0, 1),\n * {addSuffix: true}\n * )\n * //=> '1 year ago'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, in minutes?\n * var result = distanceInWordsStrict(\n * new Date(2016, 0, 1),\n * new Date(2015, 0, 1),\n * {unit: 'm'}\n * )\n * //=> '525600 minutes'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 28 January 2015, in months, rounded up?\n * var result = distanceInWordsStrict(\n * new Date(2015, 0, 28),\n * new Date(2015, 0, 1),\n * {unit: 'M', partialMethod: 'ceil'}\n * )\n * //=> '1 month'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = distanceInWordsStrict(\n * new Date(2016, 7, 1),\n * new Date(2015, 0, 1),\n * {locale: eoLocale}\n * )\n * //=> '1 jaro'\n */\n\nfunction distanceInWordsStrict(dirtyDateToCompare, dirtyDate, dirtyOptions) {\n var options = dirtyOptions || {};\n var comparison = compareDesc(dirtyDateToCompare, dirtyDate);\n var locale = options.locale;\n var localize = enLocale.distanceInWords.localize;\n\n if (locale && locale.distanceInWords && locale.distanceInWords.localize) {\n localize = locale.distanceInWords.localize;\n }\n\n var localizeOptions = {\n addSuffix: Boolean(options.addSuffix),\n comparison: comparison\n };\n var dateLeft, dateRight;\n\n if (comparison > 0) {\n dateLeft = parse(dirtyDateToCompare);\n dateRight = parse(dirtyDate);\n } else {\n dateLeft = parse(dirtyDate);\n dateRight = parse(dirtyDateToCompare);\n }\n\n var unit;\n var mathPartial = Math[options.partialMethod ? String(options.partialMethod) : 'floor'];\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offset = dateRight.getTimezoneOffset() - dateLeft.getTimezoneOffset();\n var minutes = mathPartial(seconds / 60) - offset;\n var hours, days, months, years;\n\n if (options.unit) {\n unit = String(options.unit);\n } else {\n if (minutes < 1) {\n unit = 's';\n } else if (minutes < 60) {\n unit = 'm';\n } else if (minutes < MINUTES_IN_DAY) {\n unit = 'h';\n } else if (minutes < MINUTES_IN_MONTH) {\n unit = 'd';\n } else if (minutes < MINUTES_IN_YEAR) {\n unit = 'M';\n } else {\n unit = 'Y';\n }\n } // 0 up to 60 seconds\n\n\n if (unit === 's') {\n return localize('xSeconds', seconds, localizeOptions); // 1 up to 60 mins\n } else if (unit === 'm') {\n return localize('xMinutes', minutes, localizeOptions); // 1 up to 24 hours\n } else if (unit === 'h') {\n hours = mathPartial(minutes / 60);\n return localize('xHours', hours, localizeOptions); // 1 up to 30 days\n } else if (unit === 'd') {\n days = mathPartial(minutes / MINUTES_IN_DAY);\n return localize('xDays', days, localizeOptions); // 1 up to 12 months\n } else if (unit === 'M') {\n months = mathPartial(minutes / MINUTES_IN_MONTH);\n return localize('xMonths', months, localizeOptions); // 1 year up to max Date\n } else if (unit === 'Y') {\n years = mathPartial(minutes / MINUTES_IN_YEAR);\n return localize('xYears', years, localizeOptions);\n }\n\n throw new Error('Unknown unit: ' + unit);\n}\n\nmodule.exports = distanceInWordsStrict;","var distanceInWords = require('../distance_in_words/index.js');\n/**\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param {Date|String|Number} date - the given date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result specifies if the second date is earlier or later than the first\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the distance in words\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * var result = distanceInWordsToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * var result = distanceInWordsToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * var result = distanceInWordsToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = distanceInWordsToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\n\n\nfunction distanceInWordsToNow(dirtyDate, dirtyOptions) {\n return distanceInWords(Date.now(), dirtyDate, dirtyOptions);\n}\n\nmodule.exports = distanceInWordsToNow;","var parse = require('../parse/index.js');\n/**\n * @category Day Helpers\n * @summary Return the array of dates within the specified range.\n *\n * @description\n * Return the array of dates within the specified range.\n *\n * @param {Date|String|Number} startDate - the first date\n * @param {Date|String|Number} endDate - the last date\n * @param {Number} [step=1] - the step between each day\n * @returns {Date[]} the array with starts of days from the day of startDate to the day of endDate\n * @throws {Error} startDate cannot be after endDate\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * var result = eachDay(\n * new Date(2014, 9, 6),\n * new Date(2014, 9, 10)\n * )\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\n\n\nfunction eachDay(dirtyStartDate, dirtyEndDate, dirtyStep) {\n var startDate = parse(dirtyStartDate);\n var endDate = parse(dirtyEndDate);\n var step = dirtyStep !== undefined ? dirtyStep : 1;\n var endTime = endDate.getTime();\n\n if (startDate.getTime() > endTime) {\n throw new Error('The first date cannot be after the second date');\n }\n\n var dates = [];\n var currentDate = startDate;\n currentDate.setHours(0, 0, 0, 0);\n\n while (currentDate.getTime() <= endTime) {\n dates.push(parse(currentDate));\n currentDate.setDate(currentDate.getDate() + step);\n }\n\n return dates;\n}\n\nmodule.exports = eachDay;","var parse = require('../parse/index.js');\n/**\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * var result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\n\n\nfunction endOfDay(dirtyDate) {\n var date = parse(dirtyDate);\n date.setHours(23, 59, 59, 999);\n return date;\n}\n\nmodule.exports = endOfDay;","var parse = require('../parse/index.js');\n/**\n * @category Hour Helpers\n * @summary Return the end of an hour for the given date.\n *\n * @description\n * Return the end of an hour for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an hour\n *\n * @example\n * // The end of an hour for 2 September 2014 11:55:00:\n * var result = endOfHour(new Date(2014, 8, 2, 11, 55))\n * //=> Tue Sep 02 2014 11:59:59.999\n */\n\n\nfunction endOfHour(dirtyDate) {\n var date = parse(dirtyDate);\n date.setMinutes(59, 59, 999);\n return date;\n}\n\nmodule.exports = endOfHour;","var endOfWeek = require('../end_of_week/index.js');\n/**\n * @category ISO Week Helpers\n * @summary Return the end of an ISO week for the given date.\n *\n * @description\n * Return the end of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an ISO week\n *\n * @example\n * // The end of an ISO week for 2 September 2014 11:55:00:\n * var result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 23:59:59.999\n */\n\n\nfunction endOfISOWeek(dirtyDate) {\n return endOfWeek(dirtyDate, {\n weekStartsOn: 1\n });\n}\n\nmodule.exports = endOfISOWeek;","var getISOYear = require('../get_iso_year/index.js');\n\nvar startOfISOWeek = require('../start_of_iso_week/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the end of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the end of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an ISO week-numbering year\n *\n * @example\n * // The end of an ISO week-numbering year for 2 July 2005:\n * var result = endOfISOYear(new Date(2005, 6, 2))\n * //=> Sun Jan 01 2006 23:59:59.999\n */\n\n\nfunction endOfISOYear(dirtyDate) {\n var year = getISOYear(dirtyDate);\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n var date = startOfISOWeek(fourthOfJanuaryOfNextYear);\n date.setMilliseconds(date.getMilliseconds() - 1);\n return date;\n}\n\nmodule.exports = endOfISOYear;","var parse = require('../parse/index.js');\n/**\n * @category Minute Helpers\n * @summary Return the end of a minute for the given date.\n *\n * @description\n * Return the end of a minute for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a minute\n *\n * @example\n * // The end of a minute for 1 December 2014 22:15:45.400:\n * var result = endOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:59.999\n */\n\n\nfunction endOfMinute(dirtyDate) {\n var date = parse(dirtyDate);\n date.setSeconds(59, 999);\n return date;\n}\n\nmodule.exports = endOfMinute;","var parse = require('../parse/index.js');\n/**\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * var result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\n\nfunction endOfMonth(dirtyDate) {\n var date = parse(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}\n\nmodule.exports = endOfMonth;","var parse = require('../parse/index.js');\n/**\n * @category Quarter Helpers\n * @summary Return the end of a year quarter for the given date.\n *\n * @description\n * Return the end of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a quarter\n *\n * @example\n * // The end of a quarter for 2 September 2014 11:55:00:\n * var result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\n\nfunction endOfQuarter(dirtyDate) {\n var date = parse(dirtyDate);\n var currentMonth = date.getMonth();\n var month = currentMonth - currentMonth % 3 + 3;\n date.setMonth(month, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}\n\nmodule.exports = endOfQuarter;","var parse = require('../parse/index.js');\n/**\n * @category Second Helpers\n * @summary Return the end of a second for the given date.\n *\n * @description\n * Return the end of a second for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a second\n *\n * @example\n * // The end of a second for 1 December 2014 22:15:45.400:\n * var result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:45.999\n */\n\n\nfunction endOfSecond(dirtyDate) {\n var date = parse(dirtyDate);\n date.setMilliseconds(999);\n return date;\n}\n\nmodule.exports = endOfSecond;","var endOfDay = require('../end_of_day/index.js');\n/**\n * @category Day Helpers\n * @summary Return the end of today.\n *\n * @description\n * Return the end of today.\n *\n * @returns {Date} the end of today\n *\n * @example\n * // If today is 6 October 2014:\n * var result = endOfToday()\n * //=> Mon Oct 6 2014 23:59:59.999\n */\n\n\nfunction endOfToday() {\n return endOfDay(new Date());\n}\n\nmodule.exports = endOfToday;","/**\n * @category Day Helpers\n * @summary Return the end of tomorrow.\n *\n * @description\n * Return the end of tomorrow.\n *\n * @returns {Date} the end of tomorrow\n *\n * @example\n * // If today is 6 October 2014:\n * var result = endOfTomorrow()\n * //=> Tue Oct 7 2014 23:59:59.999\n */\nfunction endOfTomorrow() {\n var now = new Date();\n var year = now.getFullYear();\n var month = now.getMonth();\n var day = now.getDate();\n var date = new Date(0);\n date.setFullYear(year, month, day + 1);\n date.setHours(23, 59, 59, 999);\n return date;\n}\n\nmodule.exports = endOfTomorrow;","var parse = require('../parse/index.js');\n/**\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * var result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * var result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 23:59:59.999\n */\n\n\nfunction endOfWeek(dirtyDate, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? Number(dirtyOptions.weekStartsOn) || 0 : 0;\n var date = parse(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n date.setDate(date.getDate() + diff);\n date.setHours(23, 59, 59, 999);\n return date;\n}\n\nmodule.exports = endOfWeek;","var parse = require('../parse/index.js');\n/**\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * var result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\n\n\nfunction endOfYear(dirtyDate) {\n var date = parse(dirtyDate);\n var year = date.getFullYear();\n date.setFullYear(year + 1, 0, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}\n\nmodule.exports = endOfYear;","/**\n * @category Day Helpers\n * @summary Return the end of yesterday.\n *\n * @description\n * Return the end of yesterday.\n *\n * @returns {Date} the end of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * var result = endOfYesterday()\n * //=> Sun Oct 5 2014 23:59:59.999\n */\nfunction endOfYesterday() {\n var now = new Date();\n var year = now.getFullYear();\n var month = now.getMonth();\n var day = now.getDate();\n var date = new Date(0);\n date.setFullYear(year, month, day - 1);\n date.setHours(23, 59, 59, 999);\n return date;\n}\n\nmodule.exports = endOfYesterday;","var getDayOfYear = require('../get_day_of_year/index.js');\n\nvar getISOWeek = require('../get_iso_week/index.js');\n\nvar getISOYear = require('../get_iso_year/index.js');\n\nvar parse = require('../parse/index.js');\n\nvar isValid = require('../is_valid/index.js');\n\nvar enLocale = require('../locale/en/index.js');\n/**\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format.\n *\n * Accepted tokens:\n * | Unit | Token | Result examples |\n * |-------------------------|-------|----------------------------------|\n * | Month | M | 1, 2, ..., 12 |\n * | | Mo | 1st, 2nd, ..., 12th |\n * | | MM | 01, 02, ..., 12 |\n * | | MMM | Jan, Feb, ..., Dec |\n * | | MMMM | January, February, ..., December |\n * | Quarter | Q | 1, 2, 3, 4 |\n * | | Qo | 1st, 2nd, 3rd, 4th |\n * | Day of month | D | 1, 2, ..., 31 |\n * | | Do | 1st, 2nd, ..., 31st |\n * | | DD | 01, 02, ..., 31 |\n * | Day of year | DDD | 1, 2, ..., 366 |\n * | | DDDo | 1st, 2nd, ..., 366th |\n * | | DDDD | 001, 002, ..., 366 |\n * | Day of week | d | 0, 1, ..., 6 |\n * | | do | 0th, 1st, ..., 6th |\n * | | dd | Su, Mo, ..., Sa |\n * | | ddd | Sun, Mon, ..., Sat |\n * | | dddd | Sunday, Monday, ..., Saturday |\n * | Day of ISO week | E | 1, 2, ..., 7 |\n * | ISO week | W | 1, 2, ..., 53 |\n * | | Wo | 1st, 2nd, ..., 53rd |\n * | | WW | 01, 02, ..., 53 |\n * | Year | YY | 00, 01, ..., 99 |\n * | | YYYY | 1900, 1901, ..., 2099 |\n * | ISO week-numbering year | GG | 00, 01, ..., 99 |\n * | | GGGG | 1900, 1901, ..., 2099 |\n * | AM/PM | A | AM, PM |\n * | | a | am, pm |\n * | | aa | a.m., p.m. |\n * | Hour | H | 0, 1, ... 23 |\n * | | HH | 00, 01, ... 23 |\n * | | h | 1, 2, ..., 12 |\n * | | hh | 01, 02, ..., 12 |\n * | Minute | m | 0, 1, ..., 59 |\n * | | mm | 00, 01, ..., 59 |\n * | Second | s | 0, 1, ..., 59 |\n * | | ss | 00, 01, ..., 59 |\n * | 1/10 of second | S | 0, 1, ..., 9 |\n * | 1/100 of second | SS | 00, 01, ..., 99 |\n * | Millisecond | SSS | 000, 001, ..., 999 |\n * | Timezone | Z | -01:00, +00:00, ... +12:00 |\n * | | ZZ | -0100, +0000, ..., +1200 |\n * | Seconds timestamp | X | 512969520 |\n * | Milliseconds timestamp | x | 512969520900 |\n *\n * The characters wrapped in square brackets are escaped.\n *\n * The result may vary by locale.\n *\n * @param {Date|String|Number} date - the original date\n * @param {String} [format='YYYY-MM-DDTHH:mm:ss.SSSZ'] - the string of tokens\n * @param {Object} [options] - the object with options\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the formatted date string\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(\n * new Date(2014, 1, 11),\n * 'MM/DD/YYYY'\n * )\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * var eoLocale = require('date-fns/locale/eo')\n * var result = format(\n * new Date(2014, 6, 2),\n * 'Do [de] MMMM YYYY',\n * {locale: eoLocale}\n * )\n * //=> '2-a de julio 2014'\n */\n\n\nfunction format(dirtyDate, dirtyFormatStr, dirtyOptions) {\n var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : 'YYYY-MM-DDTHH:mm:ss.SSSZ';\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFormatters = enLocale.format.formatters;\n var formattingTokensRegExp = enLocale.format.formattingTokensRegExp;\n\n if (locale && locale.format && locale.format.formatters) {\n localeFormatters = locale.format.formatters;\n\n if (locale.format.formattingTokensRegExp) {\n formattingTokensRegExp = locale.format.formattingTokensRegExp;\n }\n }\n\n var date = parse(dirtyDate);\n\n if (!isValid(date)) {\n return 'Invalid Date';\n }\n\n var formatFn = buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp);\n return formatFn(date);\n}\n\nvar formatters = {\n // Month: 1, 2, ..., 12\n 'M': function M(date) {\n return date.getMonth() + 1;\n },\n // Month: 01, 02, ..., 12\n 'MM': function MM(date) {\n return addLeadingZeros(date.getMonth() + 1, 2);\n },\n // Quarter: 1, 2, 3, 4\n 'Q': function Q(date) {\n return Math.ceil((date.getMonth() + 1) / 3);\n },\n // Day of month: 1, 2, ..., 31\n 'D': function D(date) {\n return date.getDate();\n },\n // Day of month: 01, 02, ..., 31\n 'DD': function DD(date) {\n return addLeadingZeros(date.getDate(), 2);\n },\n // Day of year: 1, 2, ..., 366\n 'DDD': function DDD(date) {\n return getDayOfYear(date);\n },\n // Day of year: 001, 002, ..., 366\n 'DDDD': function DDDD(date) {\n return addLeadingZeros(getDayOfYear(date), 3);\n },\n // Day of week: 0, 1, ..., 6\n 'd': function d(date) {\n return date.getDay();\n },\n // Day of ISO week: 1, 2, ..., 7\n 'E': function E(date) {\n return date.getDay() || 7;\n },\n // ISO week: 1, 2, ..., 53\n 'W': function W(date) {\n return getISOWeek(date);\n },\n // ISO week: 01, 02, ..., 53\n 'WW': function WW(date) {\n return addLeadingZeros(getISOWeek(date), 2);\n },\n // Year: 00, 01, ..., 99\n 'YY': function YY(date) {\n return addLeadingZeros(date.getFullYear(), 4).substr(2);\n },\n // Year: 1900, 1901, ..., 2099\n 'YYYY': function YYYY(date) {\n return addLeadingZeros(date.getFullYear(), 4);\n },\n // ISO week-numbering year: 00, 01, ..., 99\n 'GG': function GG(date) {\n return String(getISOYear(date)).substr(2);\n },\n // ISO week-numbering year: 1900, 1901, ..., 2099\n 'GGGG': function GGGG(date) {\n return getISOYear(date);\n },\n // Hour: 0, 1, ... 23\n 'H': function H(date) {\n return date.getHours();\n },\n // Hour: 00, 01, ..., 23\n 'HH': function HH(date) {\n return addLeadingZeros(date.getHours(), 2);\n },\n // Hour: 1, 2, ..., 12\n 'h': function h(date) {\n var hours = date.getHours();\n\n if (hours === 0) {\n return 12;\n } else if (hours > 12) {\n return hours % 12;\n } else {\n return hours;\n }\n },\n // Hour: 01, 02, ..., 12\n 'hh': function hh(date) {\n return addLeadingZeros(formatters['h'](date), 2);\n },\n // Minute: 0, 1, ..., 59\n 'm': function m(date) {\n return date.getMinutes();\n },\n // Minute: 00, 01, ..., 59\n 'mm': function mm(date) {\n return addLeadingZeros(date.getMinutes(), 2);\n },\n // Second: 0, 1, ..., 59\n 's': function s(date) {\n return date.getSeconds();\n },\n // Second: 00, 01, ..., 59\n 'ss': function ss(date) {\n return addLeadingZeros(date.getSeconds(), 2);\n },\n // 1/10 of second: 0, 1, ..., 9\n 'S': function S(date) {\n return Math.floor(date.getMilliseconds() / 100);\n },\n // 1/100 of second: 00, 01, ..., 99\n 'SS': function SS(date) {\n return addLeadingZeros(Math.floor(date.getMilliseconds() / 10), 2);\n },\n // Millisecond: 000, 001, ..., 999\n 'SSS': function SSS(date) {\n return addLeadingZeros(date.getMilliseconds(), 3);\n },\n // Timezone: -01:00, +00:00, ... +12:00\n 'Z': function Z(date) {\n return formatTimezone(date.getTimezoneOffset(), ':');\n },\n // Timezone: -0100, +0000, ... +1200\n 'ZZ': function ZZ(date) {\n return formatTimezone(date.getTimezoneOffset());\n },\n // Seconds timestamp: 512969520\n 'X': function X(date) {\n return Math.floor(date.getTime() / 1000);\n },\n // Milliseconds timestamp: 512969520900\n 'x': function x(date) {\n return date.getTime();\n }\n};\n\nfunction buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp) {\n var array = formatStr.match(formattingTokensRegExp);\n var length = array.length;\n var i;\n var formatter;\n\n for (i = 0; i < length; i++) {\n formatter = localeFormatters[array[i]] || formatters[array[i]];\n\n if (formatter) {\n array[i] = formatter;\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (date) {\n var output = '';\n\n for (var i = 0; i < length; i++) {\n if (array[i] instanceof Function) {\n output += array[i](date, formatters);\n } else {\n output += array[i];\n }\n }\n\n return output;\n };\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n}\n\nfunction formatTimezone(offset, delimeter) {\n delimeter = delimeter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2);\n}\n\nfunction addLeadingZeros(number, targetLength) {\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return output;\n}\n\nmodule.exports = format;","var parse = require('../parse/index.js');\n/**\n * @category Day Helpers\n * @summary Get the day of the month of the given date.\n *\n * @description\n * Get the day of the month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of month\n *\n * @example\n * // Which day of the month is 29 February 2012?\n * var result = getDate(new Date(2012, 1, 29))\n * //=> 29\n */\n\n\nfunction getDate(dirtyDate) {\n var date = parse(dirtyDate);\n var dayOfMonth = date.getDate();\n return dayOfMonth;\n}\n\nmodule.exports = getDate;","var parse = require('../parse/index.js');\n/**\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of week\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * var result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\n\n\nfunction getDay(dirtyDate) {\n var date = parse(dirtyDate);\n var day = date.getDay();\n return day;\n}\n\nmodule.exports = getDay;","var parse = require('../parse/index.js');\n\nvar startOfYear = require('../start_of_year/index.js');\n\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js');\n/**\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * var result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\n\n\nfunction getDayOfYear(dirtyDate) {\n var date = parse(dirtyDate);\n var diff = differenceInCalendarDays(date, startOfYear(date));\n var dayOfYear = diff + 1;\n return dayOfYear;\n}\n\nmodule.exports = getDayOfYear;","var parse = require('../parse/index.js');\n/**\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * var result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\n\nfunction getDaysInMonth(dirtyDate) {\n var date = parse(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\nmodule.exports = getDaysInMonth;","var isLeapYear = require('../is_leap_year/index.js');\n/**\n * @category Year Helpers\n * @summary Get the number of days in a year of the given date.\n *\n * @description\n * Get the number of days in a year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of days in a year\n *\n * @example\n * // How many days are in 2012?\n * var result = getDaysInYear(new Date(2012, 0, 1))\n * //=> 366\n */\n\n\nfunction getDaysInYear(dirtyDate) {\n return isLeapYear(dirtyDate) ? 366 : 365;\n}\n\nmodule.exports = getDaysInYear;","var parse = require('../parse/index.js');\n/**\n * @category Hour Helpers\n * @summary Get the hours of the given date.\n *\n * @description\n * Get the hours of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the hours\n *\n * @example\n * // Get the hours of 29 February 2012 11:45:00:\n * var result = getHours(new Date(2012, 1, 29, 11, 45))\n * //=> 11\n */\n\n\nfunction getHours(dirtyDate) {\n var date = parse(dirtyDate);\n var hours = date.getHours();\n return hours;\n}\n\nmodule.exports = getHours;","var parse = require('../parse/index.js');\n/**\n * @category Weekday Helpers\n * @summary Get the day of the ISO week of the given date.\n *\n * @description\n * Get the day of the ISO week of the given date,\n * which is 7 for Sunday, 1 for Monday etc.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of ISO week\n *\n * @example\n * // Which day of the ISO week is 26 February 2012?\n * var result = getISODay(new Date(2012, 1, 26))\n * //=> 7\n */\n\n\nfunction getISODay(dirtyDate) {\n var date = parse(dirtyDate);\n var day = date.getDay();\n\n if (day === 0) {\n day = 7;\n }\n\n return day;\n}\n\nmodule.exports = getISODay;","var parse = require('../parse/index.js');\n\nvar startOfISOWeek = require('../start_of_iso_week/index.js');\n\nvar startOfISOYear = require('../start_of_iso_year/index.js');\n\nvar MILLISECONDS_IN_WEEK = 604800000;\n/**\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * var result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\n\nfunction getISOWeek(dirtyDate) {\n var date = parse(dirtyDate);\n var diff = startOfISOWeek(date).getTime() - startOfISOYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\nmodule.exports = getISOWeek;","var startOfISOYear = require('../start_of_iso_year/index.js');\n\nvar addWeeks = require('../add_weeks/index.js');\n\nvar MILLISECONDS_IN_WEEK = 604800000;\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of weeks in an ISO week-numbering year of the given date.\n *\n * @description\n * Get the number of weeks in an ISO week-numbering year of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of ISO weeks in a year\n *\n * @example\n * // How many weeks are in ISO week-numbering year 2015?\n * var result = getISOWeeksInYear(new Date(2015, 1, 11))\n * //=> 53\n */\n\nfunction getISOWeeksInYear(dirtyDate) {\n var thisYear = startOfISOYear(dirtyDate);\n var nextYear = startOfISOYear(addWeeks(thisYear, 60));\n var diff = nextYear.valueOf() - thisYear.valueOf(); // Round the number of weeks to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK);\n}\n\nmodule.exports = getISOWeeksInYear;","var parse = require('../parse/index.js');\n\nvar startOfISOWeek = require('../start_of_iso_week/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * var result = getISOYear(new Date(2005, 0, 2))\n * //=> 2004\n */\n\n\nfunction getISOYear(dirtyDate) {\n var date = parse(dirtyDate);\n var year = date.getFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\nmodule.exports = getISOYear;","var parse = require('../parse/index.js');\n/**\n * @category Millisecond Helpers\n * @summary Get the milliseconds of the given date.\n *\n * @description\n * Get the milliseconds of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the milliseconds\n *\n * @example\n * // Get the milliseconds of 29 February 2012 11:45:05.123:\n * var result = getMilliseconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 123\n */\n\n\nfunction getMilliseconds(dirtyDate) {\n var date = parse(dirtyDate);\n var milliseconds = date.getMilliseconds();\n return milliseconds;\n}\n\nmodule.exports = getMilliseconds;","var parse = require('../parse/index.js');\n/**\n * @category Minute Helpers\n * @summary Get the minutes of the given date.\n *\n * @description\n * Get the minutes of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the minutes\n *\n * @example\n * // Get the minutes of 29 February 2012 11:45:05:\n * var result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 45\n */\n\n\nfunction getMinutes(dirtyDate) {\n var date = parse(dirtyDate);\n var minutes = date.getMinutes();\n return minutes;\n}\n\nmodule.exports = getMinutes;","var parse = require('../parse/index.js');\n/**\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the month\n *\n * @example\n * // Which month is 29 February 2012?\n * var result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\n\n\nfunction getMonth(dirtyDate) {\n var date = parse(dirtyDate);\n var month = date.getMonth();\n return month;\n}\n\nmodule.exports = getMonth;","var parse = require('../parse/index.js');\n\nvar MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000;\n/**\n * @category Range Helpers\n * @summary Get the number of days that overlap in two date ranges\n *\n * @description\n * Get the number of days that overlap in two date ranges\n *\n * @param {Date|String|Number} initialRangeStartDate - the start of the initial range\n * @param {Date|String|Number} initialRangeEndDate - the end of the initial range\n * @param {Date|String|Number} comparedRangeStartDate - the start of the range to compare it with\n * @param {Date|String|Number} comparedRangeEndDate - the end of the range to compare it with\n * @returns {Number} the number of days that overlap in two date ranges\n * @throws {Error} startDate of a date range cannot be after its endDate\n *\n * @example\n * // For overlapping date ranges adds 1 for each started overlapping day:\n * getOverlappingDaysInRanges(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 17), new Date(2014, 0, 21)\n * )\n * //=> 3\n *\n * @example\n * // For non-overlapping date ranges returns 0:\n * getOverlappingDaysInRanges(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 21), new Date(2014, 0, 22)\n * )\n * //=> 0\n */\n\nfunction getOverlappingDaysInRanges(dirtyInitialRangeStartDate, dirtyInitialRangeEndDate, dirtyComparedRangeStartDate, dirtyComparedRangeEndDate) {\n var initialStartTime = parse(dirtyInitialRangeStartDate).getTime();\n var initialEndTime = parse(dirtyInitialRangeEndDate).getTime();\n var comparedStartTime = parse(dirtyComparedRangeStartDate).getTime();\n var comparedEndTime = parse(dirtyComparedRangeEndDate).getTime();\n\n if (initialStartTime > initialEndTime || comparedStartTime > comparedEndTime) {\n throw new Error('The start of the range cannot be after the end of the range');\n }\n\n var isOverlapping = initialStartTime < comparedEndTime && comparedStartTime < initialEndTime;\n\n if (!isOverlapping) {\n return 0;\n }\n\n var overlapStartDate = comparedStartTime < initialStartTime ? initialStartTime : comparedStartTime;\n var overlapEndDate = comparedEndTime > initialEndTime ? initialEndTime : comparedEndTime;\n var differenceInMs = overlapEndDate - overlapStartDate;\n return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY);\n}\n\nmodule.exports = getOverlappingDaysInRanges;","var parse = require('../parse/index.js');\n/**\n * @category Quarter Helpers\n * @summary Get the year quarter of the given date.\n *\n * @description\n * Get the year quarter of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the quarter\n *\n * @example\n * // Which quarter is 2 July 2014?\n * var result = getQuarter(new Date(2014, 6, 2))\n * //=> 3\n */\n\n\nfunction getQuarter(dirtyDate) {\n var date = parse(dirtyDate);\n var quarter = Math.floor(date.getMonth() / 3) + 1;\n return quarter;\n}\n\nmodule.exports = getQuarter;","var parse = require('../parse/index.js');\n/**\n * @category Second Helpers\n * @summary Get the seconds of the given date.\n *\n * @description\n * Get the seconds of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the seconds\n *\n * @example\n * // Get the seconds of 29 February 2012 11:45:05.123:\n * var result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 5\n */\n\n\nfunction getSeconds(dirtyDate) {\n var date = parse(dirtyDate);\n var seconds = date.getSeconds();\n return seconds;\n}\n\nmodule.exports = getSeconds;","var parse = require('../parse/index.js');\n/**\n * @category Timestamp Helpers\n * @summary Get the milliseconds timestamp of the given date.\n *\n * @description\n * Get the milliseconds timestamp of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the timestamp\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05.123:\n * var result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 1330515905123\n */\n\n\nfunction getTime(dirtyDate) {\n var date = parse(dirtyDate);\n var timestamp = date.getTime();\n return timestamp;\n}\n\nmodule.exports = getTime;","var parse = require('../parse/index.js');\n/**\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the year\n *\n * @example\n * // Which year is 2 July 2014?\n * var result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\n\n\nfunction getYear(dirtyDate) {\n var date = parse(dirtyDate);\n var year = date.getFullYear();\n return year;\n}\n\nmodule.exports = getYear;","module.exports = {\n addDays: require('./add_days/index.js'),\n addHours: require('./add_hours/index.js'),\n addISOYears: require('./add_iso_years/index.js'),\n addMilliseconds: require('./add_milliseconds/index.js'),\n addMinutes: require('./add_minutes/index.js'),\n addMonths: require('./add_months/index.js'),\n addQuarters: require('./add_quarters/index.js'),\n addSeconds: require('./add_seconds/index.js'),\n addWeeks: require('./add_weeks/index.js'),\n addYears: require('./add_years/index.js'),\n areRangesOverlapping: require('./are_ranges_overlapping/index.js'),\n closestIndexTo: require('./closest_index_to/index.js'),\n closestTo: require('./closest_to/index.js'),\n compareAsc: require('./compare_asc/index.js'),\n compareDesc: require('./compare_desc/index.js'),\n differenceInCalendarDays: require('./difference_in_calendar_days/index.js'),\n differenceInCalendarISOWeeks: require('./difference_in_calendar_iso_weeks/index.js'),\n differenceInCalendarISOYears: require('./difference_in_calendar_iso_years/index.js'),\n differenceInCalendarMonths: require('./difference_in_calendar_months/index.js'),\n differenceInCalendarQuarters: require('./difference_in_calendar_quarters/index.js'),\n differenceInCalendarWeeks: require('./difference_in_calendar_weeks/index.js'),\n differenceInCalendarYears: require('./difference_in_calendar_years/index.js'),\n differenceInDays: require('./difference_in_days/index.js'),\n differenceInHours: require('./difference_in_hours/index.js'),\n differenceInISOYears: require('./difference_in_iso_years/index.js'),\n differenceInMilliseconds: require('./difference_in_milliseconds/index.js'),\n differenceInMinutes: require('./difference_in_minutes/index.js'),\n differenceInMonths: require('./difference_in_months/index.js'),\n differenceInQuarters: require('./difference_in_quarters/index.js'),\n differenceInSeconds: require('./difference_in_seconds/index.js'),\n differenceInWeeks: require('./difference_in_weeks/index.js'),\n differenceInYears: require('./difference_in_years/index.js'),\n distanceInWords: require('./distance_in_words/index.js'),\n distanceInWordsStrict: require('./distance_in_words_strict/index.js'),\n distanceInWordsToNow: require('./distance_in_words_to_now/index.js'),\n eachDay: require('./each_day/index.js'),\n endOfDay: require('./end_of_day/index.js'),\n endOfHour: require('./end_of_hour/index.js'),\n endOfISOWeek: require('./end_of_iso_week/index.js'),\n endOfISOYear: require('./end_of_iso_year/index.js'),\n endOfMinute: require('./end_of_minute/index.js'),\n endOfMonth: require('./end_of_month/index.js'),\n endOfQuarter: require('./end_of_quarter/index.js'),\n endOfSecond: require('./end_of_second/index.js'),\n endOfToday: require('./end_of_today/index.js'),\n endOfTomorrow: require('./end_of_tomorrow/index.js'),\n endOfWeek: require('./end_of_week/index.js'),\n endOfYear: require('./end_of_year/index.js'),\n endOfYesterday: require('./end_of_yesterday/index.js'),\n format: require('./format/index.js'),\n getDate: require('./get_date/index.js'),\n getDay: require('./get_day/index.js'),\n getDayOfYear: require('./get_day_of_year/index.js'),\n getDaysInMonth: require('./get_days_in_month/index.js'),\n getDaysInYear: require('./get_days_in_year/index.js'),\n getHours: require('./get_hours/index.js'),\n getISODay: require('./get_iso_day/index.js'),\n getISOWeek: require('./get_iso_week/index.js'),\n getISOWeeksInYear: require('./get_iso_weeks_in_year/index.js'),\n getISOYear: require('./get_iso_year/index.js'),\n getMilliseconds: require('./get_milliseconds/index.js'),\n getMinutes: require('./get_minutes/index.js'),\n getMonth: require('./get_month/index.js'),\n getOverlappingDaysInRanges: require('./get_overlapping_days_in_ranges/index.js'),\n getQuarter: require('./get_quarter/index.js'),\n getSeconds: require('./get_seconds/index.js'),\n getTime: require('./get_time/index.js'),\n getYear: require('./get_year/index.js'),\n isAfter: require('./is_after/index.js'),\n isBefore: require('./is_before/index.js'),\n isDate: require('./is_date/index.js'),\n isEqual: require('./is_equal/index.js'),\n isFirstDayOfMonth: require('./is_first_day_of_month/index.js'),\n isFriday: require('./is_friday/index.js'),\n isFuture: require('./is_future/index.js'),\n isLastDayOfMonth: require('./is_last_day_of_month/index.js'),\n isLeapYear: require('./is_leap_year/index.js'),\n isMonday: require('./is_monday/index.js'),\n isPast: require('./is_past/index.js'),\n isSameDay: require('./is_same_day/index.js'),\n isSameHour: require('./is_same_hour/index.js'),\n isSameISOWeek: require('./is_same_iso_week/index.js'),\n isSameISOYear: require('./is_same_iso_year/index.js'),\n isSameMinute: require('./is_same_minute/index.js'),\n isSameMonth: require('./is_same_month/index.js'),\n isSameQuarter: require('./is_same_quarter/index.js'),\n isSameSecond: require('./is_same_second/index.js'),\n isSameWeek: require('./is_same_week/index.js'),\n isSameYear: require('./is_same_year/index.js'),\n isSaturday: require('./is_saturday/index.js'),\n isSunday: require('./is_sunday/index.js'),\n isThisHour: require('./is_this_hour/index.js'),\n isThisISOWeek: require('./is_this_iso_week/index.js'),\n isThisISOYear: require('./is_this_iso_year/index.js'),\n isThisMinute: require('./is_this_minute/index.js'),\n isThisMonth: require('./is_this_month/index.js'),\n isThisQuarter: require('./is_this_quarter/index.js'),\n isThisSecond: require('./is_this_second/index.js'),\n isThisWeek: require('./is_this_week/index.js'),\n isThisYear: require('./is_this_year/index.js'),\n isThursday: require('./is_thursday/index.js'),\n isToday: require('./is_today/index.js'),\n isTomorrow: require('./is_tomorrow/index.js'),\n isTuesday: require('./is_tuesday/index.js'),\n isValid: require('./is_valid/index.js'),\n isWednesday: require('./is_wednesday/index.js'),\n isWeekend: require('./is_weekend/index.js'),\n isWithinRange: require('./is_within_range/index.js'),\n isYesterday: require('./is_yesterday/index.js'),\n lastDayOfISOWeek: require('./last_day_of_iso_week/index.js'),\n lastDayOfISOYear: require('./last_day_of_iso_year/index.js'),\n lastDayOfMonth: require('./last_day_of_month/index.js'),\n lastDayOfQuarter: require('./last_day_of_quarter/index.js'),\n lastDayOfWeek: require('./last_day_of_week/index.js'),\n lastDayOfYear: require('./last_day_of_year/index.js'),\n max: require('./max/index.js'),\n min: require('./min/index.js'),\n parse: require('./parse/index.js'),\n setDate: require('./set_date/index.js'),\n setDay: require('./set_day/index.js'),\n setDayOfYear: require('./set_day_of_year/index.js'),\n setHours: require('./set_hours/index.js'),\n setISODay: require('./set_iso_day/index.js'),\n setISOWeek: require('./set_iso_week/index.js'),\n setISOYear: require('./set_iso_year/index.js'),\n setMilliseconds: require('./set_milliseconds/index.js'),\n setMinutes: require('./set_minutes/index.js'),\n setMonth: require('./set_month/index.js'),\n setQuarter: require('./set_quarter/index.js'),\n setSeconds: require('./set_seconds/index.js'),\n setYear: require('./set_year/index.js'),\n startOfDay: require('./start_of_day/index.js'),\n startOfHour: require('./start_of_hour/index.js'),\n startOfISOWeek: require('./start_of_iso_week/index.js'),\n startOfISOYear: require('./start_of_iso_year/index.js'),\n startOfMinute: require('./start_of_minute/index.js'),\n startOfMonth: require('./start_of_month/index.js'),\n startOfQuarter: require('./start_of_quarter/index.js'),\n startOfSecond: require('./start_of_second/index.js'),\n startOfToday: require('./start_of_today/index.js'),\n startOfTomorrow: require('./start_of_tomorrow/index.js'),\n startOfWeek: require('./start_of_week/index.js'),\n startOfYear: require('./start_of_year/index.js'),\n startOfYesterday: require('./start_of_yesterday/index.js'),\n subDays: require('./sub_days/index.js'),\n subHours: require('./sub_hours/index.js'),\n subISOYears: require('./sub_iso_years/index.js'),\n subMilliseconds: require('./sub_milliseconds/index.js'),\n subMinutes: require('./sub_minutes/index.js'),\n subMonths: require('./sub_months/index.js'),\n subQuarters: require('./sub_quarters/index.js'),\n subSeconds: require('./sub_seconds/index.js'),\n subWeeks: require('./sub_weeks/index.js'),\n subYears: require('./sub_years/index.js')\n};","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|String|Number} date - the date that should be after the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\n\n\nfunction isAfter(dirtyDate, dirtyDateToCompare) {\n var date = parse(dirtyDate);\n var dateToCompare = parse(dirtyDateToCompare);\n return date.getTime() > dateToCompare.getTime();\n}\n\nmodule.exports = isAfter;","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param {Date|String|Number} date - the date that should be before the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\n\n\nfunction isBefore(dirtyDate, dirtyDateToCompare) {\n var date = parse(dirtyDate);\n var dateToCompare = parse(dirtyDateToCompare);\n return date.getTime() < dateToCompare.getTime();\n}\n\nmodule.exports = isBefore;","/**\n * @category Common Helpers\n * @summary Is the given argument an instance of Date?\n *\n * @description\n * Is the given argument an instance of Date?\n *\n * @param {*} argument - the argument to check\n * @returns {Boolean} the given argument is an instance of Date\n *\n * @example\n * // Is 'mayonnaise' a Date?\n * var result = isDate('mayonnaise')\n * //=> false\n */\nfunction isDate(argument) {\n return argument instanceof Date;\n}\n\nmodule.exports = isDate;","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0)\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\n\n\nfunction isEqual(dirtyLeftDate, dirtyRightDate) {\n var dateLeft = parse(dirtyLeftDate);\n var dateRight = parse(dirtyRightDate);\n return dateLeft.getTime() === dateRight.getTime();\n}\n\nmodule.exports = isEqual;","var parse = require('../parse/index.js');\n/**\n * @category Month Helpers\n * @summary Is the given date the first day of a month?\n *\n * @description\n * Is the given date the first day of a month?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is the first day of a month\n *\n * @example\n * // Is 1 September 2014 the first day of a month?\n * var result = isFirstDayOfMonth(new Date(2014, 8, 1))\n * //=> true\n */\n\n\nfunction isFirstDayOfMonth(dirtyDate) {\n return parse(dirtyDate).getDate() === 1;\n}\n\nmodule.exports = isFirstDayOfMonth;","var parse = require('../parse/index.js');\n/**\n * @category Weekday Helpers\n * @summary Is the given date Friday?\n *\n * @description\n * Is the given date Friday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Friday\n *\n * @example\n * // Is 26 September 2014 Friday?\n * var result = isFriday(new Date(2014, 8, 26))\n * //=> true\n */\n\n\nfunction isFriday(dirtyDate) {\n return parse(dirtyDate).getDay() === 5;\n}\n\nmodule.exports = isFriday;","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Is the given date in the future?\n *\n * @description\n * Is the given date in the future?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in the future\n *\n * @example\n * // If today is 6 October 2014, is 31 December 2014 in the future?\n * var result = isFuture(new Date(2014, 11, 31))\n * //=> true\n */\n\n\nfunction isFuture(dirtyDate) {\n return parse(dirtyDate).getTime() > new Date().getTime();\n}\n\nmodule.exports = isFuture;","var parse = require('../parse/index.js');\n\nvar endOfDay = require('../end_of_day/index.js');\n\nvar endOfMonth = require('../end_of_month/index.js');\n/**\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * var result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\n\n\nfunction isLastDayOfMonth(dirtyDate) {\n var date = parse(dirtyDate);\n return endOfDay(date).getTime() === endOfMonth(date).getTime();\n}\n\nmodule.exports = isLastDayOfMonth;","var parse = require('../parse/index.js');\n/**\n * @category Year Helpers\n * @summary Is the given date in the leap year?\n *\n * @description\n * Is the given date in the leap year?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in the leap year\n *\n * @example\n * // Is 1 September 2012 in the leap year?\n * var result = isLeapYear(new Date(2012, 8, 1))\n * //=> true\n */\n\n\nfunction isLeapYear(dirtyDate) {\n var date = parse(dirtyDate);\n var year = date.getFullYear();\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}\n\nmodule.exports = isLeapYear;","var parse = require('../parse/index.js');\n/**\n * @category Weekday Helpers\n * @summary Is the given date Monday?\n *\n * @description\n * Is the given date Monday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Monday\n *\n * @example\n * // Is 22 September 2014 Monday?\n * var result = isMonday(new Date(2014, 8, 22))\n * //=> true\n */\n\n\nfunction isMonday(dirtyDate) {\n return parse(dirtyDate).getDay() === 1;\n}\n\nmodule.exports = isMonday;","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Is the given date in the past?\n *\n * @description\n * Is the given date in the past?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in the past\n *\n * @example\n * // If today is 6 October 2014, is 2 July 2014 in the past?\n * var result = isPast(new Date(2014, 6, 2))\n * //=> true\n */\n\n\nfunction isPast(dirtyDate) {\n return parse(dirtyDate).getTime() < new Date().getTime();\n}\n\nmodule.exports = isPast;","var startOfDay = require('../start_of_day/index.js');\n/**\n * @category Day Helpers\n * @summary Are the given dates in the same day?\n *\n * @description\n * Are the given dates in the same day?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(\n * new Date(2014, 8, 4, 6, 0),\n * new Date(2014, 8, 4, 18, 0)\n * )\n * //=> true\n */\n\n\nfunction isSameDay(dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft);\n var dateRightStartOfDay = startOfDay(dirtyDateRight);\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}\n\nmodule.exports = isSameDay;","var startOfHour = require('../start_of_hour/index.js');\n/**\n * @category Hour Helpers\n * @summary Are the given dates in the same hour?\n *\n * @description\n * Are the given dates in the same hour?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same hour\n *\n * @example\n * // Are 4 September 2014 06:00:00 and 4 September 06:30:00 in the same hour?\n * var result = isSameHour(\n * new Date(2014, 8, 4, 6, 0),\n * new Date(2014, 8, 4, 6, 30)\n * )\n * //=> true\n */\n\n\nfunction isSameHour(dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfHour = startOfHour(dirtyDateLeft);\n var dateRightStartOfHour = startOfHour(dirtyDateRight);\n return dateLeftStartOfHour.getTime() === dateRightStartOfHour.getTime();\n}\n\nmodule.exports = isSameHour;","var isSameWeek = require('../is_same_week/index.js');\n/**\n * @category ISO Week Helpers\n * @summary Are the given dates in the same ISO week?\n *\n * @description\n * Are the given dates in the same ISO week?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same ISO week\n *\n * @example\n * // Are 1 September 2014 and 7 September 2014 in the same ISO week?\n * var result = isSameISOWeek(\n * new Date(2014, 8, 1),\n * new Date(2014, 8, 7)\n * )\n * //=> true\n */\n\n\nfunction isSameISOWeek(dirtyDateLeft, dirtyDateRight) {\n return isSameWeek(dirtyDateLeft, dirtyDateRight, {\n weekStartsOn: 1\n });\n}\n\nmodule.exports = isSameISOWeek;","var startOfISOYear = require('../start_of_iso_year/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Are the given dates in the same ISO week-numbering year?\n *\n * @description\n * Are the given dates in the same ISO week-numbering year?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same ISO week-numbering year\n *\n * @example\n * // Are 29 December 2003 and 2 January 2005 in the same ISO week-numbering year?\n * var result = isSameISOYear(\n * new Date(2003, 11, 29),\n * new Date(2005, 0, 2)\n * )\n * //=> true\n */\n\n\nfunction isSameISOYear(dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfYear = startOfISOYear(dirtyDateLeft);\n var dateRightStartOfYear = startOfISOYear(dirtyDateRight);\n return dateLeftStartOfYear.getTime() === dateRightStartOfYear.getTime();\n}\n\nmodule.exports = isSameISOYear;","var startOfMinute = require('../start_of_minute/index.js');\n/**\n * @category Minute Helpers\n * @summary Are the given dates in the same minute?\n *\n * @description\n * Are the given dates in the same minute?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same minute\n *\n * @example\n * // Are 4 September 2014 06:30:00 and 4 September 2014 06:30:15\n * // in the same minute?\n * var result = isSameMinute(\n * new Date(2014, 8, 4, 6, 30),\n * new Date(2014, 8, 4, 6, 30, 15)\n * )\n * //=> true\n */\n\n\nfunction isSameMinute(dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfMinute = startOfMinute(dirtyDateLeft);\n var dateRightStartOfMinute = startOfMinute(dirtyDateRight);\n return dateLeftStartOfMinute.getTime() === dateRightStartOfMinute.getTime();\n}\n\nmodule.exports = isSameMinute;","var parse = require('../parse/index.js');\n/**\n * @category Month Helpers\n * @summary Are the given dates in the same month?\n *\n * @description\n * Are the given dates in the same month?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * var result = isSameMonth(\n * new Date(2014, 8, 2),\n * new Date(2014, 8, 25)\n * )\n * //=> true\n */\n\n\nfunction isSameMonth(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var dateRight = parse(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}\n\nmodule.exports = isSameMonth;","var startOfQuarter = require('../start_of_quarter/index.js');\n/**\n * @category Quarter Helpers\n * @summary Are the given dates in the same year quarter?\n *\n * @description\n * Are the given dates in the same year quarter?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same quarter\n *\n * @example\n * // Are 1 January 2014 and 8 March 2014 in the same quarter?\n * var result = isSameQuarter(\n * new Date(2014, 0, 1),\n * new Date(2014, 2, 8)\n * )\n * //=> true\n */\n\n\nfunction isSameQuarter(dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfQuarter = startOfQuarter(dirtyDateLeft);\n var dateRightStartOfQuarter = startOfQuarter(dirtyDateRight);\n return dateLeftStartOfQuarter.getTime() === dateRightStartOfQuarter.getTime();\n}\n\nmodule.exports = isSameQuarter;","var startOfSecond = require('../start_of_second/index.js');\n/**\n * @category Second Helpers\n * @summary Are the given dates in the same second?\n *\n * @description\n * Are the given dates in the same second?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same second\n *\n * @example\n * // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500\n * // in the same second?\n * var result = isSameSecond(\n * new Date(2014, 8, 4, 6, 30, 15),\n * new Date(2014, 8, 4, 6, 30, 15, 500)\n * )\n * //=> true\n */\n\n\nfunction isSameSecond(dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfSecond = startOfSecond(dirtyDateLeft);\n var dateRightStartOfSecond = startOfSecond(dirtyDateRight);\n return dateLeftStartOfSecond.getTime() === dateRightStartOfSecond.getTime();\n}\n\nmodule.exports = isSameSecond;","var startOfWeek = require('../start_of_week/index.js');\n/**\n * @category Week Helpers\n * @summary Are the given dates in the same week?\n *\n * @description\n * Are the given dates in the same week?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Boolean} the dates are in the same week\n *\n * @example\n * // Are 31 August 2014 and 4 September 2014 in the same week?\n * var result = isSameWeek(\n * new Date(2014, 7, 31),\n * new Date(2014, 8, 4)\n * )\n * //=> true\n *\n * @example\n * // If week starts with Monday,\n * // are 31 August 2014 and 4 September 2014 in the same week?\n * var result = isSameWeek(\n * new Date(2014, 7, 31),\n * new Date(2014, 8, 4),\n * {weekStartsOn: 1}\n * )\n * //=> false\n */\n\n\nfunction isSameWeek(dirtyDateLeft, dirtyDateRight, dirtyOptions) {\n var dateLeftStartOfWeek = startOfWeek(dirtyDateLeft, dirtyOptions);\n var dateRightStartOfWeek = startOfWeek(dirtyDateRight, dirtyOptions);\n return dateLeftStartOfWeek.getTime() === dateRightStartOfWeek.getTime();\n}\n\nmodule.exports = isSameWeek;","var parse = require('../parse/index.js');\n/**\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * var result = isSameYear(\n * new Date(2014, 8, 2),\n * new Date(2014, 8, 25)\n * )\n * //=> true\n */\n\n\nfunction isSameYear(dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft);\n var dateRight = parse(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear();\n}\n\nmodule.exports = isSameYear;","var parse = require('../parse/index.js');\n/**\n * @category Weekday Helpers\n * @summary Is the given date Saturday?\n *\n * @description\n * Is the given date Saturday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Saturday\n *\n * @example\n * // Is 27 September 2014 Saturday?\n * var result = isSaturday(new Date(2014, 8, 27))\n * //=> true\n */\n\n\nfunction isSaturday(dirtyDate) {\n return parse(dirtyDate).getDay() === 6;\n}\n\nmodule.exports = isSaturday;","var parse = require('../parse/index.js');\n/**\n * @category Weekday Helpers\n * @summary Is the given date Sunday?\n *\n * @description\n * Is the given date Sunday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Sunday\n *\n * @example\n * // Is 21 September 2014 Sunday?\n * var result = isSunday(new Date(2014, 8, 21))\n * //=> true\n */\n\n\nfunction isSunday(dirtyDate) {\n return parse(dirtyDate).getDay() === 0;\n}\n\nmodule.exports = isSunday;","var isSameHour = require('../is_same_hour/index.js');\n/**\n * @category Hour Helpers\n * @summary Is the given date in the same hour as the current date?\n *\n * @description\n * Is the given date in the same hour as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this hour\n *\n * @example\n * // If now is 25 September 2014 18:30:15.500,\n * // is 25 September 2014 18:00:00 in this hour?\n * var result = isThisHour(new Date(2014, 8, 25, 18))\n * //=> true\n */\n\n\nfunction isThisHour(dirtyDate) {\n return isSameHour(new Date(), dirtyDate);\n}\n\nmodule.exports = isThisHour;","var isSameISOWeek = require('../is_same_iso_week/index.js');\n/**\n * @category ISO Week Helpers\n * @summary Is the given date in the same ISO week as the current date?\n *\n * @description\n * Is the given date in the same ISO week as the current date?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this ISO week\n *\n * @example\n * // If today is 25 September 2014, is 22 September 2014 in this ISO week?\n * var result = isThisISOWeek(new Date(2014, 8, 22))\n * //=> true\n */\n\n\nfunction isThisISOWeek(dirtyDate) {\n return isSameISOWeek(new Date(), dirtyDate);\n}\n\nmodule.exports = isThisISOWeek;","var isSameISOYear = require('../is_same_iso_year/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Is the given date in the same ISO week-numbering year as the current date?\n *\n * @description\n * Is the given date in the same ISO week-numbering year as the current date?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this ISO week-numbering year\n *\n * @example\n * // If today is 25 September 2014,\n * // is 30 December 2013 in this ISO week-numbering year?\n * var result = isThisISOYear(new Date(2013, 11, 30))\n * //=> true\n */\n\n\nfunction isThisISOYear(dirtyDate) {\n return isSameISOYear(new Date(), dirtyDate);\n}\n\nmodule.exports = isThisISOYear;","var isSameMinute = require('../is_same_minute/index.js');\n/**\n * @category Minute Helpers\n * @summary Is the given date in the same minute as the current date?\n *\n * @description\n * Is the given date in the same minute as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this minute\n *\n * @example\n * // If now is 25 September 2014 18:30:15.500,\n * // is 25 September 2014 18:30:00 in this minute?\n * var result = isThisMinute(new Date(2014, 8, 25, 18, 30))\n * //=> true\n */\n\n\nfunction isThisMinute(dirtyDate) {\n return isSameMinute(new Date(), dirtyDate);\n}\n\nmodule.exports = isThisMinute;","var isSameMonth = require('../is_same_month/index.js');\n/**\n * @category Month Helpers\n * @summary Is the given date in the same month as the current date?\n *\n * @description\n * Is the given date in the same month as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this month\n *\n * @example\n * // If today is 25 September 2014, is 15 September 2014 in this month?\n * var result = isThisMonth(new Date(2014, 8, 15))\n * //=> true\n */\n\n\nfunction isThisMonth(dirtyDate) {\n return isSameMonth(new Date(), dirtyDate);\n}\n\nmodule.exports = isThisMonth;","var isSameQuarter = require('../is_same_quarter/index.js');\n/**\n * @category Quarter Helpers\n * @summary Is the given date in the same quarter as the current date?\n *\n * @description\n * Is the given date in the same quarter as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this quarter\n *\n * @example\n * // If today is 25 September 2014, is 2 July 2014 in this quarter?\n * var result = isThisQuarter(new Date(2014, 6, 2))\n * //=> true\n */\n\n\nfunction isThisQuarter(dirtyDate) {\n return isSameQuarter(new Date(), dirtyDate);\n}\n\nmodule.exports = isThisQuarter;","var isSameSecond = require('../is_same_second/index.js');\n/**\n * @category Second Helpers\n * @summary Is the given date in the same second as the current date?\n *\n * @description\n * Is the given date in the same second as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this second\n *\n * @example\n * // If now is 25 September 2014 18:30:15.500,\n * // is 25 September 2014 18:30:15.000 in this second?\n * var result = isThisSecond(new Date(2014, 8, 25, 18, 30, 15))\n * //=> true\n */\n\n\nfunction isThisSecond(dirtyDate) {\n return isSameSecond(new Date(), dirtyDate);\n}\n\nmodule.exports = isThisSecond;","var isSameWeek = require('../is_same_week/index.js');\n/**\n * @category Week Helpers\n * @summary Is the given date in the same week as the current date?\n *\n * @description\n * Is the given date in the same week as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Boolean} the date is in this week\n *\n * @example\n * // If today is 25 September 2014, is 21 September 2014 in this week?\n * var result = isThisWeek(new Date(2014, 8, 21))\n * //=> true\n *\n * @example\n * // If today is 25 September 2014 and week starts with Monday\n * // is 21 September 2014 in this week?\n * var result = isThisWeek(new Date(2014, 8, 21), {weekStartsOn: 1})\n * //=> false\n */\n\n\nfunction isThisWeek(dirtyDate, dirtyOptions) {\n return isSameWeek(new Date(), dirtyDate, dirtyOptions);\n}\n\nmodule.exports = isThisWeek;","var isSameYear = require('../is_same_year/index.js');\n/**\n * @category Year Helpers\n * @summary Is the given date in the same year as the current date?\n *\n * @description\n * Is the given date in the same year as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this year\n *\n * @example\n * // If today is 25 September 2014, is 2 July 2014 in this year?\n * var result = isThisYear(new Date(2014, 6, 2))\n * //=> true\n */\n\n\nfunction isThisYear(dirtyDate) {\n return isSameYear(new Date(), dirtyDate);\n}\n\nmodule.exports = isThisYear;","var parse = require('../parse/index.js');\n/**\n * @category Weekday Helpers\n * @summary Is the given date Thursday?\n *\n * @description\n * Is the given date Thursday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Thursday\n *\n * @example\n * // Is 25 September 2014 Thursday?\n * var result = isThursday(new Date(2014, 8, 25))\n * //=> true\n */\n\n\nfunction isThursday(dirtyDate) {\n return parse(dirtyDate).getDay() === 4;\n}\n\nmodule.exports = isThursday;","var startOfDay = require('../start_of_day/index.js');\n/**\n * @category Day Helpers\n * @summary Is the given date today?\n *\n * @description\n * Is the given date today?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is today\n *\n * @example\n * // If today is 6 October 2014, is 6 October 14:00:00 today?\n * var result = isToday(new Date(2014, 9, 6, 14, 0))\n * //=> true\n */\n\n\nfunction isToday(dirtyDate) {\n return startOfDay(dirtyDate).getTime() === startOfDay(new Date()).getTime();\n}\n\nmodule.exports = isToday;","var startOfDay = require('../start_of_day/index.js');\n/**\n * @category Day Helpers\n * @summary Is the given date tomorrow?\n *\n * @description\n * Is the given date tomorrow?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is tomorrow\n *\n * @example\n * // If today is 6 October 2014, is 7 October 14:00:00 tomorrow?\n * var result = isTomorrow(new Date(2014, 9, 7, 14, 0))\n * //=> true\n */\n\n\nfunction isTomorrow(dirtyDate) {\n var tomorrow = new Date();\n tomorrow.setDate(tomorrow.getDate() + 1);\n return startOfDay(dirtyDate).getTime() === startOfDay(tomorrow).getTime();\n}\n\nmodule.exports = isTomorrow;","var parse = require('../parse/index.js');\n/**\n * @category Weekday Helpers\n * @summary Is the given date Tuesday?\n *\n * @description\n * Is the given date Tuesday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Tuesday\n *\n * @example\n * // Is 23 September 2014 Tuesday?\n * var result = isTuesday(new Date(2014, 8, 23))\n * //=> true\n */\n\n\nfunction isTuesday(dirtyDate) {\n return parse(dirtyDate).getDay() === 2;\n}\n\nmodule.exports = isTuesday;","var isDate = require('../is_date/index.js');\n/**\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {Date} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} argument must be an instance of Date\n *\n * @example\n * // For the valid date:\n * var result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the invalid date:\n * var result = isValid(new Date(''))\n * //=> false\n */\n\n\nfunction isValid(dirtyDate) {\n if (isDate(dirtyDate)) {\n return !isNaN(dirtyDate);\n } else {\n throw new TypeError(toString.call(dirtyDate) + ' is not an instance of Date');\n }\n}\n\nmodule.exports = isValid;","var parse = require('../parse/index.js');\n/**\n * @category Weekday Helpers\n * @summary Is the given date Wednesday?\n *\n * @description\n * Is the given date Wednesday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Wednesday\n *\n * @example\n * // Is 24 September 2014 Wednesday?\n * var result = isWednesday(new Date(2014, 8, 24))\n * //=> true\n */\n\n\nfunction isWednesday(dirtyDate) {\n return parse(dirtyDate).getDay() === 3;\n}\n\nmodule.exports = isWednesday;","var parse = require('../parse/index.js');\n/**\n * @category Weekday Helpers\n * @summary Does the given date fall on a weekend?\n *\n * @description\n * Does the given date fall on a weekend?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date falls on a weekend\n *\n * @example\n * // Does 5 October 2014 fall on a weekend?\n * var result = isWeekend(new Date(2014, 9, 5))\n * //=> true\n */\n\n\nfunction isWeekend(dirtyDate) {\n var date = parse(dirtyDate);\n var day = date.getDay();\n return day === 0 || day === 6;\n}\n\nmodule.exports = isWeekend;","var parse = require('../parse/index.js');\n/**\n * @category Range Helpers\n * @summary Is the given date within the range?\n *\n * @description\n * Is the given date within the range?\n *\n * @param {Date|String|Number} date - the date to check\n * @param {Date|String|Number} startDate - the start of range\n * @param {Date|String|Number} endDate - the end of range\n * @returns {Boolean} the date is within the range\n * @throws {Error} startDate cannot be after endDate\n *\n * @example\n * // For the date within the range:\n * isWithinRange(\n * new Date(2014, 0, 3), new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n * //=> true\n *\n * @example\n * // For the date outside of the range:\n * isWithinRange(\n * new Date(2014, 0, 10), new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n * //=> false\n */\n\n\nfunction isWithinRange(dirtyDate, dirtyStartDate, dirtyEndDate) {\n var time = parse(dirtyDate).getTime();\n var startTime = parse(dirtyStartDate).getTime();\n var endTime = parse(dirtyEndDate).getTime();\n\n if (startTime > endTime) {\n throw new Error('The start of the range cannot be after the end of the range');\n }\n\n return time >= startTime && time <= endTime;\n}\n\nmodule.exports = isWithinRange;","var startOfDay = require('../start_of_day/index.js');\n/**\n * @category Day Helpers\n * @summary Is the given date yesterday?\n *\n * @description\n * Is the given date yesterday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is yesterday\n *\n * @example\n * // If today is 6 October 2014, is 5 October 14:00:00 yesterday?\n * var result = isYesterday(new Date(2014, 9, 5, 14, 0))\n * //=> true\n */\n\n\nfunction isYesterday(dirtyDate) {\n var yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n return startOfDay(dirtyDate).getTime() === startOfDay(yesterday).getTime();\n}\n\nmodule.exports = isYesterday;","var lastDayOfWeek = require('../last_day_of_week/index.js');\n/**\n * @category ISO Week Helpers\n * @summary Return the last day of an ISO week for the given date.\n *\n * @description\n * Return the last day of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of an ISO week\n *\n * @example\n * // The last day of an ISO week for 2 September 2014 11:55:00:\n * var result = lastDayOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 00:00:00\n */\n\n\nfunction lastDayOfISOWeek(dirtyDate) {\n return lastDayOfWeek(dirtyDate, {\n weekStartsOn: 1\n });\n}\n\nmodule.exports = lastDayOfISOWeek;","var getISOYear = require('../get_iso_year/index.js');\n\nvar startOfISOWeek = require('../start_of_iso_week/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the last day of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the last day of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an ISO week-numbering year\n *\n * @example\n * // The last day of an ISO week-numbering year for 2 July 2005:\n * var result = lastDayOfISOYear(new Date(2005, 6, 2))\n * //=> Sun Jan 01 2006 00:00:00\n */\n\n\nfunction lastDayOfISOYear(dirtyDate) {\n var year = getISOYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setFullYear(year + 1, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n var date = startOfISOWeek(fourthOfJanuary);\n date.setDate(date.getDate() - 1);\n return date;\n}\n\nmodule.exports = lastDayOfISOYear;","var parse = require('../parse/index.js');\n/**\n * @category Month Helpers\n * @summary Return the last day of a month for the given date.\n *\n * @description\n * Return the last day of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of a month\n *\n * @example\n * // The last day of a month for 2 September 2014 11:55:00:\n * var result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 00:00:00\n */\n\n\nfunction lastDayOfMonth(dirtyDate) {\n var date = parse(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = lastDayOfMonth;","var parse = require('../parse/index.js');\n/**\n * @category Quarter Helpers\n * @summary Return the last day of a year quarter for the given date.\n *\n * @description\n * Return the last day of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of a quarter\n *\n * @example\n * // The last day of a quarter for 2 September 2014 11:55:00:\n * var result = lastDayOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 00:00:00\n */\n\n\nfunction lastDayOfQuarter(dirtyDate) {\n var date = parse(dirtyDate);\n var currentMonth = date.getMonth();\n var month = currentMonth - currentMonth % 3 + 3;\n date.setMonth(month, 0);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = lastDayOfQuarter;","var parse = require('../parse/index.js');\n/**\n * @category Week Helpers\n * @summary Return the last day of a week for the given date.\n *\n * @description\n * Return the last day of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the last day of a week\n *\n * @example\n * // The last day of a week for 2 September 2014 11:55:00:\n * var result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the last day of the week for 2 September 2014 11:55:00:\n * var result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 00:00:00\n */\n\n\nfunction lastDayOfWeek(dirtyDate, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? Number(dirtyOptions.weekStartsOn) || 0 : 0;\n var date = parse(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + diff);\n return date;\n}\n\nmodule.exports = lastDayOfWeek;","var parse = require('../parse/index.js');\n/**\n * @category Year Helpers\n * @summary Return the last day of a year for the given date.\n *\n * @description\n * Return the last day of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of a year\n *\n * @example\n * // The last day of a year for 2 September 2014 11:55:00:\n * var result = lastDayOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 00:00:00\n */\n\n\nfunction lastDayOfYear(dirtyDate) {\n var date = parse(dirtyDate);\n var year = date.getFullYear();\n date.setFullYear(year + 1, 0, 0);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = lastDayOfYear;","var commonFormatterKeys = ['M', 'MM', 'Q', 'D', 'DD', 'DDD', 'DDDD', 'd', 'E', 'W', 'WW', 'YY', 'YYYY', 'GG', 'GGGG', 'H', 'HH', 'h', 'hh', 'm', 'mm', 's', 'ss', 'S', 'SS', 'SSS', 'Z', 'ZZ', 'X', 'x'];\n\nfunction buildFormattingTokensRegExp(formatters) {\n var formatterKeys = [];\n\n for (var key in formatters) {\n if (formatters.hasOwnProperty(key)) {\n formatterKeys.push(key);\n }\n }\n\n var formattingTokens = commonFormatterKeys.concat(formatterKeys).sort().reverse();\n var formattingTokensRegExp = new RegExp('(\\\\[[^\\\\[]*\\\\])|(\\\\\\\\)?' + '(' + formattingTokens.join('|') + '|.)', 'g');\n return formattingTokensRegExp;\n}\n\nmodule.exports = buildFormattingTokensRegExp;","function buildDistanceInWordsLocale() {\n var distanceInWordsLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n };\n\n function localize(token, count, options) {\n options = options || {};\n var result;\n\n if (typeof distanceInWordsLocale[token] === 'string') {\n result = distanceInWordsLocale[token];\n } else if (count === 1) {\n result = distanceInWordsLocale[token].one;\n } else {\n result = distanceInWordsLocale[token].other.replace('{{count}}', count);\n }\n\n if (options.addSuffix) {\n if (options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n\n return result;\n }\n\n return {\n localize: localize\n };\n}\n\nmodule.exports = buildDistanceInWordsLocale;","var buildFormattingTokensRegExp = require('../../_lib/build_formatting_tokens_reg_exp/index.js');\n\nfunction buildFormatLocale() {\n // Note: in English, the names of days of the week and months are capitalized.\n // If you are making a new locale based on this one, check if the same is true for the language you're working on.\n // Generally, formatted dates should look like they are in the middle of a sentence,\n // e.g. in Spanish language the weekdays and months should be in the lowercase.\n var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n var monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n var weekdays2char = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];\n var weekdays3char = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n var weekdaysFull = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n var meridiemUppercase = ['AM', 'PM'];\n var meridiemLowercase = ['am', 'pm'];\n var meridiemFull = ['a.m.', 'p.m.'];\n var formatters = {\n // Month: Jan, Feb, ..., Dec\n 'MMM': function MMM(date) {\n return months3char[date.getMonth()];\n },\n // Month: January, February, ..., December\n 'MMMM': function MMMM(date) {\n return monthsFull[date.getMonth()];\n },\n // Day of week: Su, Mo, ..., Sa\n 'dd': function dd(date) {\n return weekdays2char[date.getDay()];\n },\n // Day of week: Sun, Mon, ..., Sat\n 'ddd': function ddd(date) {\n return weekdays3char[date.getDay()];\n },\n // Day of week: Sunday, Monday, ..., Saturday\n 'dddd': function dddd(date) {\n return weekdaysFull[date.getDay()];\n },\n // AM, PM\n 'A': function A(date) {\n return date.getHours() / 12 >= 1 ? meridiemUppercase[1] : meridiemUppercase[0];\n },\n // am, pm\n 'a': function a(date) {\n return date.getHours() / 12 >= 1 ? meridiemLowercase[1] : meridiemLowercase[0];\n },\n // a.m., p.m.\n 'aa': function aa(date) {\n return date.getHours() / 12 >= 1 ? meridiemFull[1] : meridiemFull[0];\n }\n }; // Generate ordinal version of formatters: M -> Mo, D -> Do, etc.\n\n var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'];\n ordinalFormatters.forEach(function (formatterToken) {\n formatters[formatterToken + 'o'] = function (date, formatters) {\n return ordinal(formatters[formatterToken](date));\n };\n });\n return {\n formatters: formatters,\n formattingTokensRegExp: buildFormattingTokensRegExp(formatters)\n };\n}\n\nfunction ordinal(number) {\n var rem100 = number % 100;\n\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n\n case 2:\n return number + 'nd';\n\n case 3:\n return number + 'rd';\n }\n }\n\n return number + 'th';\n}\n\nmodule.exports = buildFormatLocale;","var buildDistanceInWordsLocale = require('./build_distance_in_words_locale/index.js');\n\nvar buildFormatLocale = require('./build_format_locale/index.js');\n/**\n * @category Locales\n * @summary English locale.\n */\n\n\nmodule.exports = {\n distanceInWords: buildDistanceInWordsLocale(),\n format: buildFormatLocale()\n};","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @param {...(Date|String|Number)} dates - the dates to compare\n * @returns {Date} the latest of the dates\n *\n * @example\n * // Which of these dates is the latest?\n * var result = max(\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * )\n * //=> Sun Jul 02 1995 00:00:00\n */\n\n\nfunction max() {\n var dirtyDates = Array.prototype.slice.call(arguments);\n var dates = dirtyDates.map(function (dirtyDate) {\n return parse(dirtyDate);\n });\n var latestTimestamp = Math.max.apply(null, dates);\n return new Date(latestTimestamp);\n}\n\nmodule.exports = max;","var parse = require('../parse/index.js');\n/**\n * @category Common Helpers\n * @summary Return the earliest of the given dates.\n *\n * @description\n * Return the earliest of the given dates.\n *\n * @param {...(Date|String|Number)} dates - the dates to compare\n * @returns {Date} the earliest of the dates\n *\n * @example\n * // Which of these dates is the earliest?\n * var result = min(\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * )\n * //=> Wed Feb 11 1987 00:00:00\n */\n\n\nfunction min() {\n var dirtyDates = Array.prototype.slice.call(arguments);\n var dates = dirtyDates.map(function (dirtyDate) {\n return parse(dirtyDate);\n });\n var earliestTimestamp = Math.min.apply(null, dates);\n return new Date(earliestTimestamp);\n}\n\nmodule.exports = min;","var getTimezoneOffsetInMilliseconds = require('../_lib/getTimezoneOffsetInMilliseconds/index.js');\n\nvar isDate = require('../is_date/index.js');\n\nvar MILLISECONDS_IN_HOUR = 3600000;\nvar MILLISECONDS_IN_MINUTE = 60000;\nvar DEFAULT_ADDITIONAL_DIGITS = 2;\nvar parseTokenDateTimeDelimeter = /[T ]/;\nvar parseTokenPlainTime = /:/; // year tokens\n\nvar parseTokenYY = /^(\\d{2})$/;\nvar parseTokensYYY = [/^([+-]\\d{2})$/, // 0 additional digits\n/^([+-]\\d{3})$/, // 1 additional digit\n/^([+-]\\d{4})$/ // 2 additional digits\n];\nvar parseTokenYYYY = /^(\\d{4})/;\nvar parseTokensYYYYY = [/^([+-]\\d{4})/, // 0 additional digits\n/^([+-]\\d{5})/, // 1 additional digit\n/^([+-]\\d{6})/ // 2 additional digits\n]; // date tokens\n\nvar parseTokenMM = /^-(\\d{2})$/;\nvar parseTokenDDD = /^-?(\\d{3})$/;\nvar parseTokenMMDD = /^-?(\\d{2})-?(\\d{2})$/;\nvar parseTokenWww = /^-?W(\\d{2})$/;\nvar parseTokenWwwD = /^-?W(\\d{2})-?(\\d{1})$/; // time tokens\n\nvar parseTokenHH = /^(\\d{2}([.,]\\d*)?)$/;\nvar parseTokenHHMM = /^(\\d{2}):?(\\d{2}([.,]\\d*)?)$/;\nvar parseTokenHHMMSS = /^(\\d{2}):?(\\d{2}):?(\\d{2}([.,]\\d*)?)$/; // timezone tokens\n\nvar parseTokenTimezone = /([Z+-].*)$/;\nvar parseTokenTimezoneZ = /^(Z)$/;\nvar parseTokenTimezoneHH = /^([+-])(\\d{2})$/;\nvar parseTokenTimezoneHHMM = /^([+-])(\\d{2}):?(\\d{2})$/;\n/**\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If an argument is a string, the function tries to parse it.\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If all above fails, the function passes the given argument to Date constructor.\n *\n * @param {Date|String|Number} argument - the value to convert\n * @param {Object} [options] - the object with options\n * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * var result = parse('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Parse string '+02014101',\n * // if the additional number of digits in the extended year format is 1:\n * var result = parse('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\n\nfunction parse(argument, dirtyOptions) {\n if (isDate(argument)) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument !== 'string') {\n return new Date(argument);\n }\n\n var options = dirtyOptions || {};\n var additionalDigits = options.additionalDigits;\n\n if (additionalDigits == null) {\n additionalDigits = DEFAULT_ADDITIONAL_DIGITS;\n } else {\n additionalDigits = Number(additionalDigits);\n }\n\n var dateStrings = splitDateString(argument);\n var parseYearResult = parseYear(dateStrings.date, additionalDigits);\n var year = parseYearResult.year;\n var restDateString = parseYearResult.restDateString;\n var date = parseDate(restDateString, year);\n\n if (date) {\n var timestamp = date.getTime();\n var time = 0;\n var offset;\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE;\n } else {\n var fullTime = timestamp + time;\n var fullTimeDate = new Date(fullTime);\n offset = getTimezoneOffsetInMilliseconds(fullTimeDate); // Adjust time when it's coming from DST\n\n var fullTimeDateNextDay = new Date(fullTime);\n fullTimeDateNextDay.setDate(fullTimeDate.getDate() + 1);\n var offsetDiff = getTimezoneOffsetInMilliseconds(fullTimeDateNextDay) - getTimezoneOffsetInMilliseconds(fullTimeDate);\n\n if (offsetDiff > 0) {\n offset += offsetDiff;\n }\n }\n\n return new Date(timestamp + time + offset);\n } else {\n return new Date(argument);\n }\n}\n\nfunction splitDateString(dateString) {\n var dateStrings = {};\n var array = dateString.split(parseTokenDateTimeDelimeter);\n var timeString;\n\n if (parseTokenPlainTime.test(array[0])) {\n dateStrings.date = null;\n timeString = array[0];\n } else {\n dateStrings.date = array[0];\n timeString = array[1];\n }\n\n if (timeString) {\n var token = parseTokenTimezone.exec(timeString);\n\n if (token) {\n dateStrings.time = timeString.replace(token[1], '');\n dateStrings.timezone = token[1];\n } else {\n dateStrings.time = timeString;\n }\n }\n\n return dateStrings;\n}\n\nfunction parseYear(dateString, additionalDigits) {\n var parseTokenYYY = parseTokensYYY[additionalDigits];\n var parseTokenYYYYY = parseTokensYYYYY[additionalDigits];\n var token; // YYYY or ±YYYYY\n\n token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString);\n\n if (token) {\n var yearString = token[1];\n return {\n year: parseInt(yearString, 10),\n restDateString: dateString.slice(yearString.length)\n };\n } // YY or ±YYY\n\n\n token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString);\n\n if (token) {\n var centuryString = token[1];\n return {\n year: parseInt(centuryString, 10) * 100,\n restDateString: dateString.slice(centuryString.length)\n };\n } // Invalid ISO-formatted year\n\n\n return {\n year: null\n };\n}\n\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) {\n return null;\n }\n\n var token;\n var date;\n var month;\n var week; // YYYY\n\n if (dateString.length === 0) {\n date = new Date(0);\n date.setUTCFullYear(year);\n return date;\n } // YYYY-MM\n\n\n token = parseTokenMM.exec(dateString);\n\n if (token) {\n date = new Date(0);\n month = parseInt(token[1], 10) - 1;\n date.setUTCFullYear(year, month);\n return date;\n } // YYYY-DDD or YYYYDDD\n\n\n token = parseTokenDDD.exec(dateString);\n\n if (token) {\n date = new Date(0);\n var dayOfYear = parseInt(token[1], 10);\n date.setUTCFullYear(year, 0, dayOfYear);\n return date;\n } // YYYY-MM-DD or YYYYMMDD\n\n\n token = parseTokenMMDD.exec(dateString);\n\n if (token) {\n date = new Date(0);\n month = parseInt(token[1], 10) - 1;\n var day = parseInt(token[2], 10);\n date.setUTCFullYear(year, month, day);\n return date;\n } // YYYY-Www or YYYYWww\n\n\n token = parseTokenWww.exec(dateString);\n\n if (token) {\n week = parseInt(token[1], 10) - 1;\n return dayOfISOYear(year, week);\n } // YYYY-Www-D or YYYYWwwD\n\n\n token = parseTokenWwwD.exec(dateString);\n\n if (token) {\n week = parseInt(token[1], 10) - 1;\n var dayOfWeek = parseInt(token[2], 10) - 1;\n return dayOfISOYear(year, week, dayOfWeek);\n } // Invalid ISO-formatted date\n\n\n return null;\n}\n\nfunction parseTime(timeString) {\n var token;\n var hours;\n var minutes; // hh\n\n token = parseTokenHH.exec(timeString);\n\n if (token) {\n hours = parseFloat(token[1].replace(',', '.'));\n return hours % 24 * MILLISECONDS_IN_HOUR;\n } // hh:mm or hhmm\n\n\n token = parseTokenHHMM.exec(timeString);\n\n if (token) {\n hours = parseInt(token[1], 10);\n minutes = parseFloat(token[2].replace(',', '.'));\n return hours % 24 * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;\n } // hh:mm:ss or hhmmss\n\n\n token = parseTokenHHMMSS.exec(timeString);\n\n if (token) {\n hours = parseInt(token[1], 10);\n minutes = parseInt(token[2], 10);\n var seconds = parseFloat(token[3].replace(',', '.'));\n return hours % 24 * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * 1000;\n } // Invalid ISO-formatted time\n\n\n return null;\n}\n\nfunction parseTimezone(timezoneString) {\n var token;\n var absoluteOffset; // Z\n\n token = parseTokenTimezoneZ.exec(timezoneString);\n\n if (token) {\n return 0;\n } // ±hh\n\n\n token = parseTokenTimezoneHH.exec(timezoneString);\n\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60;\n return token[1] === '+' ? -absoluteOffset : absoluteOffset;\n } // ±hh:mm or ±hhmm\n\n\n token = parseTokenTimezoneHHMM.exec(timezoneString);\n\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10);\n return token[1] === '+' ? -absoluteOffset : absoluteOffset;\n }\n\n return 0;\n}\n\nfunction dayOfISOYear(isoYear, week, day) {\n week = week || 0;\n day = day || 0;\n var date = new Date(0);\n date.setUTCFullYear(isoYear, 0, 4);\n var fourthOfJanuaryDay = date.getUTCDay() || 7;\n var diff = week * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}\n\nmodule.exports = parse;","var parse = require('../parse/index.js');\n/**\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month setted\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * var result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\n\n\nfunction setDate(dirtyDate, dirtyDayOfMonth) {\n var date = parse(dirtyDate);\n var dayOfMonth = Number(dirtyDayOfMonth);\n date.setDate(dayOfMonth);\n return date;\n}\n\nmodule.exports = setDate;","var parse = require('../parse/index.js');\n\nvar addDays = require('../add_days/index.js');\n/**\n * @category Weekday Helpers\n * @summary Set the day of the week to the given date.\n *\n * @description\n * Set the day of the week to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} day - the day of the week of the new date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the new date with the day of the week setted\n *\n * @example\n * // Set Sunday to 1 September 2014:\n * var result = setDay(new Date(2014, 8, 1), 0)\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If week starts with Monday, set Sunday to 1 September 2014:\n * var result = setDay(new Date(2014, 8, 1), 0, {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 00:00:00\n */\n\n\nfunction setDay(dirtyDate, dirtyDay, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? Number(dirtyOptions.weekStartsOn) || 0 : 0;\n var date = parse(dirtyDate);\n var day = Number(dirtyDay);\n var currentDay = date.getDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n return addDays(date, diff);\n}\n\nmodule.exports = setDay;","var parse = require('../parse/index.js');\n/**\n * @category Day Helpers\n * @summary Set the day of the year to the given date.\n *\n * @description\n * Set the day of the year to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} dayOfYear - the day of the year of the new date\n * @returns {Date} the new date with the day of the year setted\n *\n * @example\n * // Set the 2nd day of the year to 2 July 2014:\n * var result = setDayOfYear(new Date(2014, 6, 2), 2)\n * //=> Thu Jan 02 2014 00:00:00\n */\n\n\nfunction setDayOfYear(dirtyDate, dirtyDayOfYear) {\n var date = parse(dirtyDate);\n var dayOfYear = Number(dirtyDayOfYear);\n date.setMonth(0);\n date.setDate(dayOfYear);\n return date;\n}\n\nmodule.exports = setDayOfYear;","var parse = require('../parse/index.js');\n/**\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} hours - the hours of the new date\n * @returns {Date} the new date with the hours setted\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * var result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\n\n\nfunction setHours(dirtyDate, dirtyHours) {\n var date = parse(dirtyDate);\n var hours = Number(dirtyHours);\n date.setHours(hours);\n return date;\n}\n\nmodule.exports = setHours;","var parse = require('../parse/index.js');\n\nvar addDays = require('../add_days/index.js');\n\nvar getISODay = require('../get_iso_day/index.js');\n/**\n * @category Weekday Helpers\n * @summary Set the day of the ISO week to the given date.\n *\n * @description\n * Set the day of the ISO week to the given date.\n * ISO week starts with Monday.\n * 7 is the index of Sunday, 1 is the index of Monday etc.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} day - the day of the ISO week of the new date\n * @returns {Date} the new date with the day of the ISO week setted\n *\n * @example\n * // Set Sunday to 1 September 2014:\n * var result = setISODay(new Date(2014, 8, 1), 7)\n * //=> Sun Sep 07 2014 00:00:00\n */\n\n\nfunction setISODay(dirtyDate, dirtyDay) {\n var date = parse(dirtyDate);\n var day = Number(dirtyDay);\n var currentDay = getISODay(date);\n var diff = day - currentDay;\n return addDays(date, diff);\n}\n\nmodule.exports = setISODay;","var parse = require('../parse/index.js');\n\nvar getISOWeek = require('../get_iso_week/index.js');\n/**\n * @category ISO Week Helpers\n * @summary Set the ISO week to the given date.\n *\n * @description\n * Set the ISO week to the given date, saving the weekday number.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} isoWeek - the ISO week of the new date\n * @returns {Date} the new date with the ISO week setted\n *\n * @example\n * // Set the 53rd ISO week to 7 August 2004:\n * var result = setISOWeek(new Date(2004, 7, 7), 53)\n * //=> Sat Jan 01 2005 00:00:00\n */\n\n\nfunction setISOWeek(dirtyDate, dirtyISOWeek) {\n var date = parse(dirtyDate);\n var isoWeek = Number(dirtyISOWeek);\n var diff = getISOWeek(date) - isoWeek;\n date.setDate(date.getDate() - diff * 7);\n return date;\n}\n\nmodule.exports = setISOWeek;","var parse = require('../parse/index.js');\n\nvar startOfISOYear = require('../start_of_iso_year/index.js');\n\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Set the ISO week-numbering year to the given date.\n *\n * @description\n * Set the ISO week-numbering year to the given date,\n * saving the week number and the weekday number.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} isoYear - the ISO week-numbering year of the new date\n * @returns {Date} the new date with the ISO week-numbering year setted\n *\n * @example\n * // Set ISO week-numbering year 2007 to 29 December 2008:\n * var result = setISOYear(new Date(2008, 11, 29), 2007)\n * //=> Mon Jan 01 2007 00:00:00\n */\n\n\nfunction setISOYear(dirtyDate, dirtyISOYear) {\n var date = parse(dirtyDate);\n var isoYear = Number(dirtyISOYear);\n var diff = differenceInCalendarDays(date, startOfISOYear(date));\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setFullYear(isoYear, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n date = startOfISOYear(fourthOfJanuary);\n date.setDate(date.getDate() + diff);\n return date;\n}\n\nmodule.exports = setISOYear;","var parse = require('../parse/index.js');\n/**\n * @category Millisecond Helpers\n * @summary Set the milliseconds to the given date.\n *\n * @description\n * Set the milliseconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} milliseconds - the milliseconds of the new date\n * @returns {Date} the new date with the milliseconds setted\n *\n * @example\n * // Set 300 milliseconds to 1 September 2014 11:30:40.500:\n * var result = setMilliseconds(new Date(2014, 8, 1, 11, 30, 40, 500), 300)\n * //=> Mon Sep 01 2014 11:30:40.300\n */\n\n\nfunction setMilliseconds(dirtyDate, dirtyMilliseconds) {\n var date = parse(dirtyDate);\n var milliseconds = Number(dirtyMilliseconds);\n date.setMilliseconds(milliseconds);\n return date;\n}\n\nmodule.exports = setMilliseconds;","var parse = require('../parse/index.js');\n/**\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} minutes - the minutes of the new date\n * @returns {Date} the new date with the minutes setted\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * var result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\n\n\nfunction setMinutes(dirtyDate, dirtyMinutes) {\n var date = parse(dirtyDate);\n var minutes = Number(dirtyMinutes);\n date.setMinutes(minutes);\n return date;\n}\n\nmodule.exports = setMinutes;","var parse = require('../parse/index.js');\n\nvar getDaysInMonth = require('../get_days_in_month/index.js');\n/**\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month setted\n *\n * @example\n * // Set February to 1 September 2014:\n * var result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\n\nfunction setMonth(dirtyDate, dirtyMonth) {\n var date = parse(dirtyDate);\n var month = Number(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}\n\nmodule.exports = setMonth;","var parse = require('../parse/index.js');\n\nvar setMonth = require('../set_month/index.js');\n/**\n * @category Quarter Helpers\n * @summary Set the year quarter to the given date.\n *\n * @description\n * Set the year quarter to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} quarter - the quarter of the new date\n * @returns {Date} the new date with the quarter setted\n *\n * @example\n * // Set the 2nd quarter to 2 July 2014:\n * var result = setQuarter(new Date(2014, 6, 2), 2)\n * //=> Wed Apr 02 2014 00:00:00\n */\n\n\nfunction setQuarter(dirtyDate, dirtyQuarter) {\n var date = parse(dirtyDate);\n var quarter = Number(dirtyQuarter);\n var oldQuarter = Math.floor(date.getMonth() / 3) + 1;\n var diff = quarter - oldQuarter;\n return setMonth(date, date.getMonth() + diff * 3);\n}\n\nmodule.exports = setQuarter;","var parse = require('../parse/index.js');\n/**\n * @category Second Helpers\n * @summary Set the seconds to the given date.\n *\n * @description\n * Set the seconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} seconds - the seconds of the new date\n * @returns {Date} the new date with the seconds setted\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * var result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\n\n\nfunction setSeconds(dirtyDate, dirtySeconds) {\n var date = parse(dirtyDate);\n var seconds = Number(dirtySeconds);\n date.setSeconds(seconds);\n return date;\n}\n\nmodule.exports = setSeconds;","var parse = require('../parse/index.js');\n/**\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year setted\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * var result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\n\n\nfunction setYear(dirtyDate, dirtyYear) {\n var date = parse(dirtyDate);\n var year = Number(dirtyYear);\n date.setFullYear(year);\n return date;\n}\n\nmodule.exports = setYear;","var parse = require('../parse/index.js');\n/**\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\n\n\nfunction startOfDay(dirtyDate) {\n var date = parse(dirtyDate);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = startOfDay;","var parse = require('../parse/index.js');\n/**\n * @category Hour Helpers\n * @summary Return the start of an hour for the given date.\n *\n * @description\n * Return the start of an hour for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an hour\n *\n * @example\n * // The start of an hour for 2 September 2014 11:55:00:\n * var result = startOfHour(new Date(2014, 8, 2, 11, 55))\n * //=> Tue Sep 02 2014 11:00:00\n */\n\n\nfunction startOfHour(dirtyDate) {\n var date = parse(dirtyDate);\n date.setMinutes(0, 0, 0);\n return date;\n}\n\nmodule.exports = startOfHour;","var startOfWeek = require('../start_of_week/index.js');\n/**\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\n\nfunction startOfISOWeek(dirtyDate) {\n return startOfWeek(dirtyDate, {\n weekStartsOn: 1\n });\n}\n\nmodule.exports = startOfISOWeek;","var getISOYear = require('../get_iso_year/index.js');\n\nvar startOfISOWeek = require('../start_of_iso_week/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an ISO year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * var result = startOfISOYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\n\n\nfunction startOfISOYear(dirtyDate) {\n var year = getISOYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n var date = startOfISOWeek(fourthOfJanuary);\n return date;\n}\n\nmodule.exports = startOfISOYear;","var parse = require('../parse/index.js');\n/**\n * @category Minute Helpers\n * @summary Return the start of a minute for the given date.\n *\n * @description\n * Return the start of a minute for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a minute\n *\n * @example\n * // The start of a minute for 1 December 2014 22:15:45.400:\n * var result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:00\n */\n\n\nfunction startOfMinute(dirtyDate) {\n var date = parse(dirtyDate);\n date.setSeconds(0, 0);\n return date;\n}\n\nmodule.exports = startOfMinute;","var parse = require('../parse/index.js');\n/**\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * var result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\n\nfunction startOfMonth(dirtyDate) {\n var date = parse(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = startOfMonth;","var parse = require('../parse/index.js');\n/**\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a quarter\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * var result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\n\n\nfunction startOfQuarter(dirtyDate) {\n var date = parse(dirtyDate);\n var currentMonth = date.getMonth();\n var month = currentMonth - currentMonth % 3;\n date.setMonth(month, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = startOfQuarter;","var parse = require('../parse/index.js');\n/**\n * @category Second Helpers\n * @summary Return the start of a second for the given date.\n *\n * @description\n * Return the start of a second for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a second\n *\n * @example\n * // The start of a second for 1 December 2014 22:15:45.400:\n * var result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:45.000\n */\n\n\nfunction startOfSecond(dirtyDate) {\n var date = parse(dirtyDate);\n date.setMilliseconds(0);\n return date;\n}\n\nmodule.exports = startOfSecond;","var startOfDay = require('../start_of_day/index.js');\n/**\n * @category Day Helpers\n * @summary Return the start of today.\n *\n * @description\n * Return the start of today.\n *\n * @returns {Date} the start of today\n *\n * @example\n * // If today is 6 October 2014:\n * var result = startOfToday()\n * //=> Mon Oct 6 2014 00:00:00\n */\n\n\nfunction startOfToday() {\n return startOfDay(new Date());\n}\n\nmodule.exports = startOfToday;","/**\n * @category Day Helpers\n * @summary Return the start of tomorrow.\n *\n * @description\n * Return the start of tomorrow.\n *\n * @returns {Date} the start of tomorrow\n *\n * @example\n * // If today is 6 October 2014:\n * var result = startOfTomorrow()\n * //=> Tue Oct 7 2014 00:00:00\n */\nfunction startOfTomorrow() {\n var now = new Date();\n var year = now.getFullYear();\n var month = now.getMonth();\n var day = now.getDate();\n var date = new Date(0);\n date.setFullYear(year, month, day + 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = startOfTomorrow;","var parse = require('../parse/index.js');\n/**\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Mon Sep 01 2014 00:00:00\n */\n\n\nfunction startOfWeek(dirtyDate, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? Number(dirtyOptions.weekStartsOn) || 0 : 0;\n var date = parse(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setDate(date.getDate() - diff);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = startOfWeek;","var parse = require('../parse/index.js');\n/**\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * var result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\n\n\nfunction startOfYear(dirtyDate) {\n var cleanDate = parse(dirtyDate);\n var date = new Date(0);\n date.setFullYear(cleanDate.getFullYear(), 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = startOfYear;","/**\n * @category Day Helpers\n * @summary Return the start of yesterday.\n *\n * @description\n * Return the start of yesterday.\n *\n * @returns {Date} the start of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * var result = startOfYesterday()\n * //=> Sun Oct 5 2014 00:00:00\n */\nfunction startOfYesterday() {\n var now = new Date();\n var year = now.getFullYear();\n var month = now.getMonth();\n var day = now.getDate();\n var date = new Date(0);\n date.setFullYear(year, month, day - 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = startOfYesterday;","var addDays = require('../add_days/index.js');\n/**\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted\n * @returns {Date} the new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * var result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\n\n\nfunction subDays(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addDays(dirtyDate, -amount);\n}\n\nmodule.exports = subDays;","var addHours = require('../add_hours/index.js');\n/**\n * @category Hour Helpers\n * @summary Subtract the specified number of hours from the given date.\n *\n * @description\n * Subtract the specified number of hours from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of hours to be subtracted\n * @returns {Date} the new date with the hours subtracted\n *\n * @example\n * // Subtract 2 hours from 11 July 2014 01:00:00:\n * var result = subHours(new Date(2014, 6, 11, 1, 0), 2)\n * //=> Thu Jul 10 2014 23:00:00\n */\n\n\nfunction subHours(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addHours(dirtyDate, -amount);\n}\n\nmodule.exports = subHours;","var addISOYears = require('../add_iso_years/index.js');\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Subtract the specified number of ISO week-numbering years from the given date.\n *\n * @description\n * Subtract the specified number of ISO week-numbering years from the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of ISO week-numbering years to be subtracted\n * @returns {Date} the new date with the ISO week-numbering years subtracted\n *\n * @example\n * // Subtract 5 ISO week-numbering years from 1 September 2014:\n * var result = subISOYears(new Date(2014, 8, 1), 5)\n * //=> Mon Aug 31 2009 00:00:00\n */\n\n\nfunction subISOYears(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addISOYears(dirtyDate, -amount);\n}\n\nmodule.exports = subISOYears;","var addMilliseconds = require('../add_milliseconds/index.js');\n/**\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted\n * @returns {Date} the new date with the milliseconds subtracted\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * var result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\n\nfunction subMilliseconds(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}\n\nmodule.exports = subMilliseconds;","var addMinutes = require('../add_minutes/index.js');\n/**\n * @category Minute Helpers\n * @summary Subtract the specified number of minutes from the given date.\n *\n * @description\n * Subtract the specified number of minutes from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be subtracted\n * @returns {Date} the new date with the mintues subtracted\n *\n * @example\n * // Subtract 30 minutes from 10 July 2014 12:00:00:\n * var result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 11:30:00\n */\n\n\nfunction subMinutes(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addMinutes(dirtyDate, -amount);\n}\n\nmodule.exports = subMinutes;","var addMonths = require('../add_months/index.js');\n/**\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted\n * @returns {Date} the new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * var result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\n\n\nfunction subMonths(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addMonths(dirtyDate, -amount);\n}\n\nmodule.exports = subMonths;","var addQuarters = require('../add_quarters/index.js');\n/**\n * @category Quarter Helpers\n * @summary Subtract the specified number of year quarters from the given date.\n *\n * @description\n * Subtract the specified number of year quarters from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of quarters to be subtracted\n * @returns {Date} the new date with the quarters subtracted\n *\n * @example\n * // Subtract 3 quarters from 1 September 2014:\n * var result = subQuarters(new Date(2014, 8, 1), 3)\n * //=> Sun Dec 01 2013 00:00:00\n */\n\n\nfunction subQuarters(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addQuarters(dirtyDate, -amount);\n}\n\nmodule.exports = subQuarters;","var addSeconds = require('../add_seconds/index.js');\n/**\n * @category Second Helpers\n * @summary Subtract the specified number of seconds from the given date.\n *\n * @description\n * Subtract the specified number of seconds from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of seconds to be subtracted\n * @returns {Date} the new date with the seconds subtracted\n *\n * @example\n * // Subtract 30 seconds from 10 July 2014 12:45:00:\n * var result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n * //=> Thu Jul 10 2014 12:44:30\n */\n\n\nfunction subSeconds(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addSeconds(dirtyDate, -amount);\n}\n\nmodule.exports = subSeconds;","var addWeeks = require('../add_weeks/index.js');\n/**\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be subtracted\n * @returns {Date} the new date with the weeks subtracted\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * var result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\n\n\nfunction subWeeks(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addWeeks(dirtyDate, -amount);\n}\n\nmodule.exports = subWeeks;","var addYears = require('../add_years/index.js');\n/**\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be subtracted\n * @returns {Date} the new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * var result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\n\n\nfunction subYears(dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount);\n return addYears(dirtyDate, -amount);\n}\n\nmodule.exports = subYears;"],"names":["buildImageObj","source","asset","imageObj","_ref","_id","crop","hotspot","utcTimeStringToDate","utc","date","Date","getDate","getMonth","getFullYear","e","console","error","utcTimeStringtoTimeWords","DateTime","toFormat","utcTimeStringtoDateWords","utcTimeStringtoTimeZone","builder","imageUrlBuilder","clientConfig","imageUrlFor","image","module","exports","sanity","projectId","process","dataset","_extends","Object","assign","target","i","arguments","length","key","prototype","hasOwnProperty","call","apply","this","_unsupportedIterableToArray","o","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","Array","from","test","arr","len","arr2","_createForOfIteratorHelperLoose","Symbol","iterator","isArray","done","value","TypeError","next","bind","example","parseAssetId","ref","_ref$split","split","id","dimensionString","format","Error","_dimensionString$spli","width","height","isFinite","isRef","src","isAsset","isAssetStub","url","parseSource","isUrl","urlToId","img","applyDefaults","replace","result","left","top","bottom","right","x","y","SPEC_NAME_TO_URL_NAME_MAPPINGS","urlForImage","options","spec","cropLeft","Math","round","cropTop","hotSpotVerticalRadius","hotSpotHorizontalRadius","hotSpotCenterX","hotSpotCenterY","rect","focalPoint","ignoreImageParams","fit","specToImageUrl","cdnUrl","baseUrl","filename","params","_spec$rect","push","bg","flip","flipHorizontal","flipVertical","filter","Boolean","join","forEach","mapping","specName","param","encodeURIComponent","cropRect","imgWidth","imgHeight","desiredAspectRatio","_width","_height","_left","_top","max","floor","validFits","validCrops","validAutoModes","isSanityClientLike","client","rewriteSpecName","_step","_iterator","entry","urlBuilder","_client$clientConfig","apiUrl","apiHost","ImageUrlBuilder","parent","_proto","withOptions","newOptions","_dataset","_projectId","_bg","dpr","_dpr","maxWidth","_maxWidth","minWidth","_minWidth","maxHeight","_maxHeight","minHeight","_minHeight","size","blur","_blur","sharpen","_sharpen","_format","invert","_invert","orientation","_orientation","quality","_quality","forceDownload","download","indexOf","saturation","_saturation","auto","pad","_pad","factory","dirtyDate","getTime","baseTimezoneOffset","getTimezoneOffset","setSeconds","parse","dirtyAmount","amount","Number","setDate","addMilliseconds","getISOYear","setISOYear","timestamp","getDaysInMonth","desiredMonth","dateWithDesiredMonth","setFullYear","setHours","daysInMonth","setMonth","min","addMonths","addDays","dirtyInitialRangeStartDate","dirtyInitialRangeEndDate","dirtyComparedRangeStartDate","dirtyComparedRangeEndDate","initialStartTime","initialEndTime","comparedStartTime","comparedEndTime","dirtyDateToCompare","dirtyDatesArray","minDistance","timeToCompare","index","currentDate","distance","abs","undefined","dirtyDateLeft","dirtyDateRight","timeLeft","timeRight","startOfDay","startOfDayLeft","startOfDayRight","timestampLeft","timestampRight","startOfISOWeek","startOfISOWeekLeft","startOfISOWeekRight","dateLeft","dateRight","getQuarter","startOfWeek","dirtyOptions","startOfWeekLeft","startOfWeekRight","differenceInCalendarDays","compareAsc","sign","difference","differenceInMilliseconds","diff","ceil","differenceInCalendarISOYears","subISOYears","differenceInCalendarMonths","differenceInMonths","differenceInDays","differenceInCalendarYears","compareDesc","differenceInSeconds","enLocale","MINUTES_IN_MONTH","comparison","locale","localize","distanceInWords","localizeOptions","addSuffix","months","seconds","offset","minutes","includeSeconds","monthsSinceStartOfYear","years","MINUTES_IN_YEAR","unit","mathPartial","partialMethod","String","now","dirtyStartDate","dirtyEndDate","dirtyStep","startDate","step","endTime","dates","setMinutes","endOfWeek","weekStartsOn","year","fourthOfJanuaryOfNextYear","setMilliseconds","getMilliseconds","month","currentMonth","endOfDay","day","getDay","getDayOfYear","getISOWeek","isValid","formatters","addLeadingZeros","substr","getHours","hours","getMinutes","getSeconds","formatTimezone","removeFormattingTokens","input","match","delimeter","absOffset","number","targetLength","output","dirtyFormatStr","formatStr","localeFormatters","formattingTokensRegExp","formatFn","formatter","array","Function","buildFormatFn","startOfYear","monthIndex","lastDayOfMonth","isLeapYear","startOfISOYear","addWeeks","thisYear","valueOf","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","differenceInMs","addHours","addISOYears","addMinutes","addQuarters","addSeconds","addYears","areRangesOverlapping","closestIndexTo","closestTo","differenceInCalendarISOWeeks","differenceInCalendarQuarters","differenceInCalendarWeeks","differenceInHours","differenceInISOYears","differenceInMinutes","differenceInQuarters","differenceInWeeks","differenceInYears","distanceInWordsStrict","distanceInWordsToNow","eachDay","endOfHour","endOfISOWeek","endOfISOYear","endOfMinute","endOfMonth","endOfQuarter","endOfSecond","endOfToday","endOfTomorrow","endOfYear","endOfYesterday","getDaysInYear","getISODay","getISOWeeksInYear","getOverlappingDaysInRanges","getYear","isAfter","isBefore","isDate","isEqual","isFirstDayOfMonth","isFriday","isFuture","isLastDayOfMonth","isMonday","isPast","isSameDay","isSameHour","isSameISOWeek","isSameISOYear","isSameMinute","isSameMonth","isSameQuarter","isSameSecond","isSameWeek","isSameYear","isSaturday","isSunday","isThisHour","isThisISOWeek","isThisISOYear","isThisMinute","isThisMonth","isThisQuarter","isThisSecond","isThisWeek","isThisYear","isThursday","isToday","isTomorrow","isTuesday","isWednesday","isWeekend","isWithinRange","isYesterday","lastDayOfISOWeek","lastDayOfISOYear","lastDayOfQuarter","lastDayOfWeek","lastDayOfYear","setDay","setDayOfYear","setISODay","setISOWeek","setQuarter","setYear","startOfHour","startOfMinute","startOfMonth","startOfQuarter","startOfSecond","startOfToday","startOfTomorrow","startOfYesterday","subDays","subHours","subMilliseconds","subMinutes","subMonths","subQuarters","subSeconds","subWeeks","subYears","dateToCompare","argument","dirtyLeftDate","dirtyRightDate","dateLeftStartOfDay","dateRightStartOfDay","dateLeftStartOfHour","dateRightStartOfHour","dateLeftStartOfYear","dateRightStartOfYear","dateLeftStartOfMinute","dateRightStartOfMinute","dateLeftStartOfQuarter","dateRightStartOfQuarter","dateLeftStartOfSecond","dateRightStartOfSecond","dateLeftStartOfWeek","dateRightStartOfWeek","tomorrow","isNaN","time","startTime","yesterday","fourthOfJanuary","commonFormatterKeys","formatterKeys","formattingTokens","concat","sort","reverse","RegExp","distanceInWordsLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","token","count","buildFormattingTokensRegExp","months3char","monthsFull","weekdays2char","weekdays3char","weekdaysFull","meridiemUppercase","meridiemLowercase","meridiemFull","formatterToken","rem100","ordinal","buildDistanceInWordsLocale","buildFormatLocale","dirtyDates","map","latestTimestamp","earliestTimestamp","getTimezoneOffsetInMilliseconds","MILLISECONDS_IN_HOUR","MILLISECONDS_IN_MINUTE","parseTokenDateTimeDelimeter","parseTokenPlainTime","parseTokenYY","parseTokensYYY","parseTokenYYYY","parseTokensYYYYY","parseTokenMM","parseTokenDDD","parseTokenMMDD","parseTokenWww","parseTokenWwwD","parseTokenHH","parseTokenHHMM","parseTokenHHMMSS","parseTokenTimezone","parseTokenTimezoneZ","parseTokenTimezoneHH","parseTokenTimezoneHHMM","dayOfISOYear","isoYear","week","setUTCFullYear","getUTCDay","setUTCDate","getUTCDate","additionalDigits","dateStrings","dateString","timeString","exec","timezone","splitDateString","parseYearResult","parseTokenYYY","parseTokenYYYYY","yearString","parseInt","restDateString","centuryString","parseYear","dayOfYear","parseDate","parseFloat","parseTime","timezoneString","absoluteOffset","parseTimezone","fullTime","fullTimeDate","fullTimeDateNextDay","offsetDiff","dirtyDayOfMonth","dayOfMonth","dirtyDay","currentDay","dirtyDayOfYear","dirtyHours","dirtyISOWeek","isoWeek","dirtyISOYear","dirtyMilliseconds","milliseconds","dirtyMinutes","dirtyMonth","dirtyQuarter","dirtySeconds","dirtyYear","cleanDate"],"sourceRoot":""}