mirror of
https://github.com/osmarks/website
synced 2024-12-24 00:50:31 +00:00
osmarks
e25013c1b4
- I just added sidenotes (blog being rewritten slightly to incorporate them; WIP) - Microblog added, compiler caching mechanism reworked - Image compression
4 lines
69 KiB
JavaScript
4 lines
69 KiB
JavaScript
(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory();else if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")exports["dateFns"]=factory();else root["dateFns"]=factory()})(this,function(){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:false};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.loaded=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.p="";return __webpack_require__(0)}([function(module,exports,__webpack_require__){module.exports={addDays:__webpack_require__(1),addHours:__webpack_require__(5),addISOYears:__webpack_require__(7),addMilliseconds:__webpack_require__(6),addMinutes:__webpack_require__(15),addMonths:__webpack_require__(16),addQuarters:__webpack_require__(18),addSeconds:__webpack_require__(19),addWeeks:__webpack_require__(20),addYears:__webpack_require__(21),areRangesOverlapping:__webpack_require__(22),closestIndexTo:__webpack_require__(23),closestTo:__webpack_require__(24),compareAsc:__webpack_require__(25),compareDesc:__webpack_require__(26),differenceInCalendarDays:__webpack_require__(13),differenceInCalendarISOWeeks:__webpack_require__(27),differenceInCalendarISOYears:__webpack_require__(28),differenceInCalendarMonths:__webpack_require__(29),differenceInCalendarQuarters:__webpack_require__(30),differenceInCalendarWeeks:__webpack_require__(32),differenceInCalendarYears:__webpack_require__(33),differenceInDays:__webpack_require__(34),differenceInHours:__webpack_require__(35),differenceInISOYears:__webpack_require__(37),differenceInMilliseconds:__webpack_require__(36),differenceInMinutes:__webpack_require__(39),differenceInMonths:__webpack_require__(40),differenceInQuarters:__webpack_require__(41),differenceInSeconds:__webpack_require__(42),differenceInWeeks:__webpack_require__(43),differenceInYears:__webpack_require__(44),distanceInWords:__webpack_require__(45),distanceInWordsStrict:__webpack_require__(50),distanceInWordsToNow:__webpack_require__(51),eachDay:__webpack_require__(52),endOfDay:__webpack_require__(53),endOfHour:__webpack_require__(54),endOfISOWeek:__webpack_require__(55),endOfISOYear:__webpack_require__(57),endOfMinute:__webpack_require__(58),endOfMonth:__webpack_require__(59),endOfQuarter:__webpack_require__(60),endOfSecond:__webpack_require__(61),endOfToday:__webpack_require__(62),endOfTomorrow:__webpack_require__(63),endOfWeek:__webpack_require__(56),endOfYear:__webpack_require__(64),endOfYesterday:__webpack_require__(65),format:__webpack_require__(66),getDate:__webpack_require__(71),getDay:__webpack_require__(72),getDayOfYear:__webpack_require__(67),getDaysInMonth:__webpack_require__(17),getDaysInYear:__webpack_require__(73),getHours:__webpack_require__(75),getISODay:__webpack_require__(76),getISOWeek:__webpack_require__(69),getISOWeeksInYear:__webpack_require__(77),getISOYear:__webpack_require__(8),getMilliseconds:__webpack_require__(78),getMinutes:__webpack_require__(79),getMonth:__webpack_require__(80),getOverlappingDaysInRanges:__webpack_require__(81),getQuarter:__webpack_require__(31),getSeconds:__webpack_require__(82),getTime:__webpack_require__(83),getYear:__webpack_require__(84),isAfter:__webpack_require__(85),isBefore:__webpack_require__(86),isDate:__webpack_require__(4),isEqual:__webpack_require__(87),isFirstDayOfMonth:__webpack_require__(88),isFriday:__webpack_require__(89),isFuture:__webpack_require__(90),isLastDayOfMonth:__webpack_require__(91),isLeapYear:__webpack_require__(74),isMonday:__webpack_require__(92),isPast:__webpack_require__(93),isSameDay:__webpack_require__(94),isSameHour:__webpack_require__(95),isSameISOWeek:__webpack_require__(97),isSameISOYear:__webpack_require__(99),isSameMinute:__webpack_require__(100),isSameMonth:__webpack_require__(102),isSameQuarter:__webpack_require__(103),isSameSecond:__webpack_require__(105),isSameWeek:__webpack_require__(98),isSameYear:__webpack_require__(107),isSaturday:__webpack_require__(108),isSunday:__webpack_require__(109),isThisHour:__webpack_require__(110),isThisISOWeek:__webpack_require__(111),isThisISOYear:__webpack_require__(112),isThisMinute:__webpack_require__(113),isThisMonth:__webpack_require__(114),isThisQuarter:__webpack_require__(115),isThisSecond:__webpack_require__(116),isThisWeek:__webpack_require__(117),isThisYear:__webpack_require__(118),isThursday:__webpack_require__(119),isToday:__webpack_require__(120),isTomorrow:__webpack_require__(121),isTuesday:__webpack_require__(122),isValid:__webpack_require__(70),isWednesday:__webpack_require__(123),isWeekend:__webpack_require__(124),isWithinRange:__webpack_require__(125),isYesterday:__webpack_require__(126),lastDayOfISOWeek:__webpack_require__(127),lastDayOfISOYear:__webpack_require__(129),lastDayOfMonth:__webpack_require__(130),lastDayOfQuarter:__webpack_require__(131),lastDayOfWeek:__webpack_require__(128),lastDayOfYear:__webpack_require__(132),max:__webpack_require__(133),min:__webpack_require__(134),parse:__webpack_require__(2),setDate:__webpack_require__(135),setDay:__webpack_require__(136),setDayOfYear:__webpack_require__(137),setHours:__webpack_require__(138),setISODay:__webpack_require__(139),setISOWeek:__webpack_require__(140),setISOYear:__webpack_require__(11),setMilliseconds:__webpack_require__(141),setMinutes:__webpack_require__(142),setMonth:__webpack_require__(143),setQuarter:__webpack_require__(144),setSeconds:__webpack_require__(145),setYear:__webpack_require__(146),startOfDay:__webpack_require__(14),startOfHour:__webpack_require__(96),startOfISOWeek:__webpack_require__(9),startOfISOYear:__webpack_require__(12),startOfMinute:__webpack_require__(101),startOfMonth:__webpack_require__(147),startOfQuarter:__webpack_require__(104),startOfSecond:__webpack_require__(106),startOfToday:__webpack_require__(148),startOfTomorrow:__webpack_require__(149),startOfWeek:__webpack_require__(10),startOfYear:__webpack_require__(68),startOfYesterday:__webpack_require__(150),subDays:__webpack_require__(151),subHours:__webpack_require__(152),subISOYears:__webpack_require__(38),subMilliseconds:__webpack_require__(153),subMinutes:__webpack_require__(154),subMonths:__webpack_require__(155),subQuarters:__webpack_require__(156),subSeconds:__webpack_require__(157),subWeeks:__webpack_require__(158),subYears:__webpack_require__(159)}},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function addDays(dirtyDate,dirtyAmount){var date=parse(dirtyDate);var amount=Number(dirtyAmount);date.setDate(date.getDate()+amount);return date}module.exports=addDays},function(module,exports,__webpack_require__){var getTimezoneOffsetInMilliseconds=__webpack_require__(3);var isDate=__webpack_require__(4);var MILLISECONDS_IN_HOUR=36e5;var MILLISECONDS_IN_MINUTE=6e4;var DEFAULT_ADDITIONAL_DIGITS=2;var parseTokenDateTimeDelimeter=/[T ]/;var parseTokenPlainTime=/:/;var parseTokenYY=/^(\d{2})$/;var parseTokensYYY=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/];var parseTokenYYYY=/^(\d{4})/;var parseTokensYYYYY=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/];var parseTokenMM=/^-(\d{2})$/;var parseTokenDDD=/^-?(\d{3})$/;var parseTokenMMDD=/^-?(\d{2})-?(\d{2})$/;var parseTokenWww=/^-?W(\d{2})$/;var parseTokenWwwD=/^-?W(\d{2})-?(\d{1})$/;var parseTokenHH=/^(\d{2}([.,]\d*)?)$/;var parseTokenHHMM=/^(\d{2}):?(\d{2}([.,]\d*)?)$/;var parseTokenHHMMSS=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/;var parseTokenTimezone=/([Z+-].*)$/;var parseTokenTimezoneZ=/^(Z)$/;var parseTokenTimezoneHH=/^([+-])(\d{2})$/;var parseTokenTimezoneHHMM=/^([+-])(\d{2}):?(\d{2})$/;function parse(argument,dirtyOptions){if(isDate(argument)){return new Date(argument.getTime())}else if(typeof argument!=="string"){return new Date(argument)}var options=dirtyOptions||{};var additionalDigits=options.additionalDigits;if(additionalDigits==null){additionalDigits=DEFAULT_ADDITIONAL_DIGITS}else{additionalDigits=Number(additionalDigits)}var dateStrings=splitDateString(argument);var parseYearResult=parseYear(dateStrings.date,additionalDigits);var year=parseYearResult.year;var restDateString=parseYearResult.restDateString;var date=parseDate(restDateString,year);if(date){var timestamp=date.getTime();var time=0;var offset;if(dateStrings.time){time=parseTime(dateStrings.time)}if(dateStrings.timezone){offset=parseTimezone(dateStrings.timezone)*MILLISECONDS_IN_MINUTE}else{var fullTime=timestamp+time;var fullTimeDate=new Date(fullTime);offset=getTimezoneOffsetInMilliseconds(fullTimeDate);var fullTimeDateNextDay=new Date(fullTime);fullTimeDateNextDay.setDate(fullTimeDate.getDate()+1);var offsetDiff=getTimezoneOffsetInMilliseconds(fullTimeDateNextDay)-getTimezoneOffsetInMilliseconds(fullTimeDate);if(offsetDiff>0){offset+=offsetDiff}}return new Date(timestamp+time+offset)}else{return new Date(argument)}}function splitDateString(dateString){var dateStrings={};var array=dateString.split(parseTokenDateTimeDelimeter);var timeString;if(parseTokenPlainTime.test(array[0])){dateStrings.date=null;timeString=array[0]}else{dateStrings.date=array[0];timeString=array[1]}if(timeString){var token=parseTokenTimezone.exec(timeString);if(token){dateStrings.time=timeString.replace(token[1],"");dateStrings.timezone=token[1]}else{dateStrings.time=timeString}}return dateStrings}function parseYear(dateString,additionalDigits){var parseTokenYYY=parseTokensYYY[additionalDigits];var parseTokenYYYYY=parseTokensYYYYY[additionalDigits];var token;token=parseTokenYYYY.exec(dateString)||parseTokenYYYYY.exec(dateString);if(token){var yearString=token[1];return{year:parseInt(yearString,10),restDateString:dateString.slice(yearString.length)}}token=parseTokenYY.exec(dateString)||parseTokenYYY.exec(dateString);if(token){var centuryString=token[1];return{year:parseInt(centuryString,10)*100,restDateString:dateString.slice(centuryString.length)}}return{year:null}}function parseDate(dateString,year){if(year===null){return null}var token;var date;var month;var week;if(dateString.length===0){date=new Date(0);date.setUTCFullYear(year);return date}token=parseTokenMM.exec(dateString);if(token){date=new Date(0);month=parseInt(token[1],10)-1;date.setUTCFullYear(year,month);return date}token=parseTokenDDD.exec(dateString);if(token){date=new Date(0);var dayOfYear=parseInt(token[1],10);date.setUTCFullYear(year,0,dayOfYear);return date}token=parseTokenMMDD.exec(dateString);if(token){date=new Date(0);month=parseInt(token[1],10)-1;var day=parseInt(token[2],10);date.setUTCFullYear(year,month,day);return date}token=parseTokenWww.exec(dateString);if(token){week=parseInt(token[1],10)-1;return dayOfISOYear(year,week)}token=parseTokenWwwD.exec(dateString);if(token){week=parseInt(token[1],10)-1;var dayOfWeek=parseInt(token[2],10)-1;return dayOfISOYear(year,week,dayOfWeek)}return null}function parseTime(timeString){var token;var hours;var minutes;token=parseTokenHH.exec(timeString);if(token){hours=parseFloat(token[1].replace(",","."));return hours%24*MILLISECONDS_IN_HOUR}token=parseTokenHHMM.exec(timeString);if(token){hours=parseInt(token[1],10);minutes=parseFloat(token[2].replace(",","."));return hours%24*MILLISECONDS_IN_HOUR+minutes*MILLISECONDS_IN_MINUTE}token=parseTokenHHMMSS.exec(timeString);if(token){hours=parseInt(token[1],10);minutes=parseInt(token[2],10);var seconds=parseFloat(token[3].replace(",","."));return hours%24*MILLISECONDS_IN_HOUR+minutes*MILLISECONDS_IN_MINUTE+seconds*1e3}return null}function parseTimezone(timezoneString){var token;var absoluteOffset;token=parseTokenTimezoneZ.exec(timezoneString);if(token){return 0}token=parseTokenTimezoneHH.exec(timezoneString);if(token){absoluteOffset=parseInt(token[2],10)*60;return token[1]==="+"?-absoluteOffset:absoluteOffset}token=parseTokenTimezoneHHMM.exec(timezoneString);if(token){absoluteOffset=parseInt(token[2],10)*60+parseInt(token[3],10);return token[1]==="+"?-absoluteOffset:absoluteOffset}return 0}function dayOfISOYear(isoYear,week,day){week=week||0;day=day||0;var date=new Date(0);date.setUTCFullYear(isoYear,0,4);var fourthOfJanuaryDay=date.getUTCDay()||7;var diff=week*7+day+1-fourthOfJanuaryDay;date.setUTCDate(date.getUTCDate()+diff);return date}module.exports=parse},function(module,exports){var MILLISECONDS_IN_MINUTE=6e4;module.exports=function getTimezoneOffsetInMilliseconds(dirtyDate){var date=new Date(dirtyDate.getTime());var baseTimezoneOffset=date.getTimezoneOffset();date.setSeconds(0,0);var millisecondsPartOfTimezoneOffset=date.getTime()%MILLISECONDS_IN_MINUTE;return baseTimezoneOffset*MILLISECONDS_IN_MINUTE+millisecondsPartOfTimezoneOffset}},function(module,exports){function isDate(argument){return argument instanceof Date}module.exports=isDate},function(module,exports,__webpack_require__){var addMilliseconds=__webpack_require__(6);var MILLISECONDS_IN_HOUR=36e5;function addHours(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addMilliseconds(dirtyDate,amount*MILLISECONDS_IN_HOUR)}module.exports=addHours},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function addMilliseconds(dirtyDate,dirtyAmount){var timestamp=parse(dirtyDate).getTime();var amount=Number(dirtyAmount);return new Date(timestamp+amount)}module.exports=addMilliseconds},function(module,exports,__webpack_require__){var getISOYear=__webpack_require__(8);var setISOYear=__webpack_require__(11);function addISOYears(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return setISOYear(dirtyDate,getISOYear(dirtyDate)+amount)}module.exports=addISOYears},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var startOfISOWeek=__webpack_require__(9);function getISOYear(dirtyDate){var date=parse(dirtyDate);var year=date.getFullYear();var fourthOfJanuaryOfNextYear=new Date(0);fourthOfJanuaryOfNextYear.setFullYear(year+1,0,4);fourthOfJanuaryOfNextYear.setHours(0,0,0,0);var startOfNextYear=startOfISOWeek(fourthOfJanuaryOfNextYear);var fourthOfJanuaryOfThisYear=new Date(0);fourthOfJanuaryOfThisYear.setFullYear(year,0,4);fourthOfJanuaryOfThisYear.setHours(0,0,0,0);var startOfThisYear=startOfISOWeek(fourthOfJanuaryOfThisYear);if(date.getTime()>=startOfNextYear.getTime()){return year+1}else if(date.getTime()>=startOfThisYear.getTime()){return year}else{return year-1}}module.exports=getISOYear},function(module,exports,__webpack_require__){var startOfWeek=__webpack_require__(10);function startOfISOWeek(dirtyDate){return startOfWeek(dirtyDate,{weekStartsOn:1})}module.exports=startOfISOWeek},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function startOfWeek(dirtyDate,dirtyOptions){var weekStartsOn=dirtyOptions?Number(dirtyOptions.weekStartsOn)||0:0;var date=parse(dirtyDate);var day=date.getDay();var diff=(day<weekStartsOn?7:0)+day-weekStartsOn;date.setDate(date.getDate()-diff);date.setHours(0,0,0,0);return date}module.exports=startOfWeek},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var startOfISOYear=__webpack_require__(12);var differenceInCalendarDays=__webpack_require__(13);function setISOYear(dirtyDate,dirtyISOYear){var date=parse(dirtyDate);var isoYear=Number(dirtyISOYear);var diff=differenceInCalendarDays(date,startOfISOYear(date));var fourthOfJanuary=new Date(0);fourthOfJanuary.setFullYear(isoYear,0,4);fourthOfJanuary.setHours(0,0,0,0);date=startOfISOYear(fourthOfJanuary);date.setDate(date.getDate()+diff);return date}module.exports=setISOYear},function(module,exports,__webpack_require__){var getISOYear=__webpack_require__(8);var startOfISOWeek=__webpack_require__(9);function startOfISOYear(dirtyDate){var year=getISOYear(dirtyDate);var fourthOfJanuary=new Date(0);fourthOfJanuary.setFullYear(year,0,4);fourthOfJanuary.setHours(0,0,0,0);var date=startOfISOWeek(fourthOfJanuary);return date}module.exports=startOfISOYear},function(module,exports,__webpack_require__){var startOfDay=__webpack_require__(14);var MILLISECONDS_IN_MINUTE=6e4;var MILLISECONDS_IN_DAY=864e5;function differenceInCalendarDays(dirtyDateLeft,dirtyDateRight){var startOfDayLeft=startOfDay(dirtyDateLeft);var startOfDayRight=startOfDay(dirtyDateRight);var timestampLeft=startOfDayLeft.getTime()-startOfDayLeft.getTimezoneOffset()*MILLISECONDS_IN_MINUTE;var timestampRight=startOfDayRight.getTime()-startOfDayRight.getTimezoneOffset()*MILLISECONDS_IN_MINUTE;return Math.round((timestampLeft-timestampRight)/MILLISECONDS_IN_DAY)}module.exports=differenceInCalendarDays},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function startOfDay(dirtyDate){var date=parse(dirtyDate);date.setHours(0,0,0,0);return date}module.exports=startOfDay},function(module,exports,__webpack_require__){var addMilliseconds=__webpack_require__(6);var MILLISECONDS_IN_MINUTE=6e4;function addMinutes(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addMilliseconds(dirtyDate,amount*MILLISECONDS_IN_MINUTE)}module.exports=addMinutes},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var getDaysInMonth=__webpack_require__(17);function addMonths(dirtyDate,dirtyAmount){var date=parse(dirtyDate);var amount=Number(dirtyAmount);var desiredMonth=date.getMonth()+amount;var dateWithDesiredMonth=new Date(0);dateWithDesiredMonth.setFullYear(date.getFullYear(),desiredMonth,1);dateWithDesiredMonth.setHours(0,0,0,0);var daysInMonth=getDaysInMonth(dateWithDesiredMonth);date.setMonth(desiredMonth,Math.min(daysInMonth,date.getDate()));return date}module.exports=addMonths},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getDaysInMonth(dirtyDate){var date=parse(dirtyDate);var year=date.getFullYear();var monthIndex=date.getMonth();var lastDayOfMonth=new Date(0);lastDayOfMonth.setFullYear(year,monthIndex+1,0);lastDayOfMonth.setHours(0,0,0,0);return lastDayOfMonth.getDate()}module.exports=getDaysInMonth},function(module,exports,__webpack_require__){var addMonths=__webpack_require__(16);function addQuarters(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);var months=amount*3;return addMonths(dirtyDate,months)}module.exports=addQuarters},function(module,exports,__webpack_require__){var addMilliseconds=__webpack_require__(6);function addSeconds(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addMilliseconds(dirtyDate,amount*1e3)}module.exports=addSeconds},function(module,exports,__webpack_require__){var addDays=__webpack_require__(1);function addWeeks(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);var days=amount*7;return addDays(dirtyDate,days)}module.exports=addWeeks},function(module,exports,__webpack_require__){var addMonths=__webpack_require__(16);function addYears(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addMonths(dirtyDate,amount*12)}module.exports=addYears},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function areRangesOverlapping(dirtyInitialRangeStartDate,dirtyInitialRangeEndDate,dirtyComparedRangeStartDate,dirtyComparedRangeEndDate){var initialStartTime=parse(dirtyInitialRangeStartDate).getTime();var initialEndTime=parse(dirtyInitialRangeEndDate).getTime();var comparedStartTime=parse(dirtyComparedRangeStartDate).getTime();var comparedEndTime=parse(dirtyComparedRangeEndDate).getTime();if(initialStartTime>initialEndTime||comparedStartTime>comparedEndTime){throw new Error("The start of the range cannot be after the end of the range")}return initialStartTime<comparedEndTime&&comparedStartTime<initialEndTime}module.exports=areRangesOverlapping},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function closestIndexTo(dirtyDateToCompare,dirtyDatesArray){if(!(dirtyDatesArray instanceof Array)){throw new TypeError(toString.call(dirtyDatesArray)+" is not an instance of Array")}var dateToCompare=parse(dirtyDateToCompare);var timeToCompare=dateToCompare.getTime();var result;var minDistance;dirtyDatesArray.forEach(function(dirtyDate,index){var currentDate=parse(dirtyDate);var distance=Math.abs(timeToCompare-currentDate.getTime());if(result===undefined||distance<minDistance){result=index;minDistance=distance}});return result}module.exports=closestIndexTo},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function closestTo(dirtyDateToCompare,dirtyDatesArray){if(!(dirtyDatesArray instanceof Array)){throw new TypeError(toString.call(dirtyDatesArray)+" is not an instance of Array")}var dateToCompare=parse(dirtyDateToCompare);var timeToCompare=dateToCompare.getTime();var result;var minDistance;dirtyDatesArray.forEach(function(dirtyDate){var currentDate=parse(dirtyDate);var distance=Math.abs(timeToCompare-currentDate.getTime());if(result===undefined||distance<minDistance){result=currentDate;minDistance=distance}});return result}module.exports=closestTo},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function compareAsc(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var timeLeft=dateLeft.getTime();var dateRight=parse(dirtyDateRight);var timeRight=dateRight.getTime();if(timeLeft<timeRight){return-1}else if(timeLeft>timeRight){return 1}else{return 0}}module.exports=compareAsc},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function compareDesc(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var timeLeft=dateLeft.getTime();var dateRight=parse(dirtyDateRight);var timeRight=dateRight.getTime();if(timeLeft>timeRight){return-1}else if(timeLeft<timeRight){return 1}else{return 0}}module.exports=compareDesc},function(module,exports,__webpack_require__){var startOfISOWeek=__webpack_require__(9);var MILLISECONDS_IN_MINUTE=6e4;var MILLISECONDS_IN_WEEK=6048e5;function differenceInCalendarISOWeeks(dirtyDateLeft,dirtyDateRight){var startOfISOWeekLeft=startOfISOWeek(dirtyDateLeft);var startOfISOWeekRight=startOfISOWeek(dirtyDateRight);var timestampLeft=startOfISOWeekLeft.getTime()-startOfISOWeekLeft.getTimezoneOffset()*MILLISECONDS_IN_MINUTE;var timestampRight=startOfISOWeekRight.getTime()-startOfISOWeekRight.getTimezoneOffset()*MILLISECONDS_IN_MINUTE;return Math.round((timestampLeft-timestampRight)/MILLISECONDS_IN_WEEK)}module.exports=differenceInCalendarISOWeeks},function(module,exports,__webpack_require__){var getISOYear=__webpack_require__(8);function differenceInCalendarISOYears(dirtyDateLeft,dirtyDateRight){return getISOYear(dirtyDateLeft)-getISOYear(dirtyDateRight)}module.exports=differenceInCalendarISOYears},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function differenceInCalendarMonths(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var dateRight=parse(dirtyDateRight);var yearDiff=dateLeft.getFullYear()-dateRight.getFullYear();var monthDiff=dateLeft.getMonth()-dateRight.getMonth();return yearDiff*12+monthDiff}module.exports=differenceInCalendarMonths},function(module,exports,__webpack_require__){var getQuarter=__webpack_require__(31);var parse=__webpack_require__(2);function differenceInCalendarQuarters(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var dateRight=parse(dirtyDateRight);var yearDiff=dateLeft.getFullYear()-dateRight.getFullYear();var quarterDiff=getQuarter(dateLeft)-getQuarter(dateRight);return yearDiff*4+quarterDiff}module.exports=differenceInCalendarQuarters},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getQuarter(dirtyDate){var date=parse(dirtyDate);var quarter=Math.floor(date.getMonth()/3)+1;return quarter}module.exports=getQuarter},function(module,exports,__webpack_require__){var startOfWeek=__webpack_require__(10);var MILLISECONDS_IN_MINUTE=6e4;var MILLISECONDS_IN_WEEK=6048e5;function differenceInCalendarWeeks(dirtyDateLeft,dirtyDateRight,dirtyOptions){var startOfWeekLeft=startOfWeek(dirtyDateLeft,dirtyOptions);var startOfWeekRight=startOfWeek(dirtyDateRight,dirtyOptions);var timestampLeft=startOfWeekLeft.getTime()-startOfWeekLeft.getTimezoneOffset()*MILLISECONDS_IN_MINUTE;var timestampRight=startOfWeekRight.getTime()-startOfWeekRight.getTimezoneOffset()*MILLISECONDS_IN_MINUTE;return Math.round((timestampLeft-timestampRight)/MILLISECONDS_IN_WEEK)}module.exports=differenceInCalendarWeeks},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function differenceInCalendarYears(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var dateRight=parse(dirtyDateRight);return dateLeft.getFullYear()-dateRight.getFullYear()}module.exports=differenceInCalendarYears},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var differenceInCalendarDays=__webpack_require__(13);var compareAsc=__webpack_require__(25);function differenceInDays(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var dateRight=parse(dirtyDateRight);var sign=compareAsc(dateLeft,dateRight);var difference=Math.abs(differenceInCalendarDays(dateLeft,dateRight));dateLeft.setDate(dateLeft.getDate()-sign*difference);var isLastDayNotFull=compareAsc(dateLeft,dateRight)===-sign;return sign*(difference-isLastDayNotFull)}module.exports=differenceInDays},function(module,exports,__webpack_require__){var differenceInMilliseconds=__webpack_require__(36);var MILLISECONDS_IN_HOUR=36e5;function differenceInHours(dirtyDateLeft,dirtyDateRight){var diff=differenceInMilliseconds(dirtyDateLeft,dirtyDateRight)/MILLISECONDS_IN_HOUR;return diff>0?Math.floor(diff):Math.ceil(diff)}module.exports=differenceInHours},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function differenceInMilliseconds(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var dateRight=parse(dirtyDateRight);return dateLeft.getTime()-dateRight.getTime()}module.exports=differenceInMilliseconds},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var differenceInCalendarISOYears=__webpack_require__(28);var compareAsc=__webpack_require__(25);var subISOYears=__webpack_require__(38);function differenceInISOYears(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var dateRight=parse(dirtyDateRight);var sign=compareAsc(dateLeft,dateRight);var difference=Math.abs(differenceInCalendarISOYears(dateLeft,dateRight));dateLeft=subISOYears(dateLeft,sign*difference);var isLastISOYearNotFull=compareAsc(dateLeft,dateRight)===-sign;return sign*(difference-isLastISOYearNotFull)}module.exports=differenceInISOYears},function(module,exports,__webpack_require__){var addISOYears=__webpack_require__(7);function subISOYears(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addISOYears(dirtyDate,-amount)}module.exports=subISOYears},function(module,exports,__webpack_require__){var differenceInMilliseconds=__webpack_require__(36);var MILLISECONDS_IN_MINUTE=6e4;function differenceInMinutes(dirtyDateLeft,dirtyDateRight){var diff=differenceInMilliseconds(dirtyDateLeft,dirtyDateRight)/MILLISECONDS_IN_MINUTE;return diff>0?Math.floor(diff):Math.ceil(diff)}module.exports=differenceInMinutes},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var differenceInCalendarMonths=__webpack_require__(29);var compareAsc=__webpack_require__(25);function differenceInMonths(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var dateRight=parse(dirtyDateRight);var sign=compareAsc(dateLeft,dateRight);var difference=Math.abs(differenceInCalendarMonths(dateLeft,dateRight));dateLeft.setMonth(dateLeft.getMonth()-sign*difference);var isLastMonthNotFull=compareAsc(dateLeft,dateRight)===-sign;return sign*(difference-isLastMonthNotFull)}module.exports=differenceInMonths},function(module,exports,__webpack_require__){var differenceInMonths=__webpack_require__(40);function differenceInQuarters(dirtyDateLeft,dirtyDateRight){var diff=differenceInMonths(dirtyDateLeft,dirtyDateRight)/3;return diff>0?Math.floor(diff):Math.ceil(diff)}module.exports=differenceInQuarters},function(module,exports,__webpack_require__){var differenceInMilliseconds=__webpack_require__(36);function differenceInSeconds(dirtyDateLeft,dirtyDateRight){var diff=differenceInMilliseconds(dirtyDateLeft,dirtyDateRight)/1e3;return diff>0?Math.floor(diff):Math.ceil(diff)}module.exports=differenceInSeconds},function(module,exports,__webpack_require__){var differenceInDays=__webpack_require__(34);function differenceInWeeks(dirtyDateLeft,dirtyDateRight){var diff=differenceInDays(dirtyDateLeft,dirtyDateRight)/7;return diff>0?Math.floor(diff):Math.ceil(diff)}module.exports=differenceInWeeks},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var differenceInCalendarYears=__webpack_require__(33);var compareAsc=__webpack_require__(25);function differenceInYears(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var dateRight=parse(dirtyDateRight);var sign=compareAsc(dateLeft,dateRight);var difference=Math.abs(differenceInCalendarYears(dateLeft,dateRight));dateLeft.setFullYear(dateLeft.getFullYear()-sign*difference);var isLastYearNotFull=compareAsc(dateLeft,dateRight)===-sign;return sign*(difference-isLastYearNotFull)}module.exports=differenceInYears},function(module,exports,__webpack_require__){var compareDesc=__webpack_require__(26);var parse=__webpack_require__(2);var differenceInSeconds=__webpack_require__(42);var differenceInMonths=__webpack_require__(40);var enLocale=__webpack_require__(46);var MINUTES_IN_DAY=1440;var MINUTES_IN_ALMOST_TWO_DAYS=2520;var MINUTES_IN_MONTH=43200;var MINUTES_IN_TWO_MONTHS=86400;function distanceInWords(dirtyDateToCompare,dirtyDate,dirtyOptions){var options=dirtyOptions||{};var comparison=compareDesc(dirtyDateToCompare,dirtyDate);var locale=options.locale;var localize=enLocale.distanceInWords.localize;if(locale&&locale.distanceInWords&&locale.distanceInWords.localize){localize=locale.distanceInWords.localize}var localizeOptions={addSuffix:Boolean(options.addSuffix),comparison:comparison};var dateLeft,dateRight;if(comparison>0){dateLeft=parse(dirtyDateToCompare);dateRight=parse(dirtyDate)}else{dateLeft=parse(dirtyDate);dateRight=parse(dirtyDateToCompare)}var seconds=differenceInSeconds(dateRight,dateLeft);var offset=dateRight.getTimezoneOffset()-dateLeft.getTimezoneOffset();var minutes=Math.round(seconds/60)-offset;var months;if(minutes<2){if(options.includeSeconds){if(seconds<5){return localize("lessThanXSeconds",5,localizeOptions)}else if(seconds<10){return localize("lessThanXSeconds",10,localizeOptions)}else if(seconds<20){return localize("lessThanXSeconds",20,localizeOptions)}else if(seconds<40){return localize("halfAMinute",null,localizeOptions)}else if(seconds<60){return localize("lessThanXMinutes",1,localizeOptions)}else{return localize("xMinutes",1,localizeOptions)}}else{if(minutes===0){return localize("lessThanXMinutes",1,localizeOptions)}else{return localize("xMinutes",minutes,localizeOptions)}}}else if(minutes<45){return localize("xMinutes",minutes,localizeOptions)}else if(minutes<90){return localize("aboutXHours",1,localizeOptions)}else if(minutes<MINUTES_IN_DAY){var hours=Math.round(minutes/60);return localize("aboutXHours",hours,localizeOptions)}else if(minutes<MINUTES_IN_ALMOST_TWO_DAYS){return localize("xDays",1,localizeOptions)}else if(minutes<MINUTES_IN_MONTH){var days=Math.round(minutes/MINUTES_IN_DAY);return localize("xDays",days,localizeOptions)}else if(minutes<MINUTES_IN_TWO_MONTHS){months=Math.round(minutes/MINUTES_IN_MONTH);return localize("aboutXMonths",months,localizeOptions)}months=differenceInMonths(dateRight,dateLeft);if(months<12){var nearestMonth=Math.round(minutes/MINUTES_IN_MONTH);return localize("xMonths",nearestMonth,localizeOptions)}else{var monthsSinceStartOfYear=months%12;var years=Math.floor(months/12);if(monthsSinceStartOfYear<3){return localize("aboutXYears",years,localizeOptions)}else if(monthsSinceStartOfYear<9){return localize("overXYears",years,localizeOptions);
|
|
}else{return localize("almostXYears",years+1,localizeOptions)}}}module.exports=distanceInWords},function(module,exports,__webpack_require__){var buildDistanceInWordsLocale=__webpack_require__(47);var buildFormatLocale=__webpack_require__(48);module.exports={distanceInWords:buildDistanceInWordsLocale(),format:buildFormatLocale()}},function(module,exports){function buildDistanceInWordsLocale(){var distanceInWordsLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function localize(token,count,options){options=options||{};var result;if(typeof distanceInWordsLocale[token]==="string"){result=distanceInWordsLocale[token]}else if(count===1){result=distanceInWordsLocale[token].one}else{result=distanceInWordsLocale[token].other.replace("{{count}}",count)}if(options.addSuffix){if(options.comparison>0){return"in "+result}else{return result+" ago"}}return result}return{localize:localize}}module.exports=buildDistanceInWordsLocale},function(module,exports,__webpack_require__){var buildFormattingTokensRegExp=__webpack_require__(49);function buildFormatLocale(){var months3char=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var monthsFull=["January","February","March","April","May","June","July","August","September","October","November","December"];var weekdays2char=["Su","Mo","Tu","We","Th","Fr","Sa"];var weekdays3char=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var weekdaysFull=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var meridiemUppercase=["AM","PM"];var meridiemLowercase=["am","pm"];var meridiemFull=["a.m.","p.m."];var formatters={MMM:function(date){return months3char[date.getMonth()]},MMMM:function(date){return monthsFull[date.getMonth()]},dd:function(date){return weekdays2char[date.getDay()]},ddd:function(date){return weekdays3char[date.getDay()]},dddd:function(date){return weekdaysFull[date.getDay()]},A:function(date){return date.getHours()/12>=1?meridiemUppercase[1]:meridiemUppercase[0]},a:function(date){return date.getHours()/12>=1?meridiemLowercase[1]:meridiemLowercase[0]},aa:function(date){return date.getHours()/12>=1?meridiemFull[1]:meridiemFull[0]}};var ordinalFormatters=["M","D","DDD","d","Q","W"];ordinalFormatters.forEach(function(formatterToken){formatters[formatterToken+"o"]=function(date,formatters){return ordinal(formatters[formatterToken](date))}});return{formatters:formatters,formattingTokensRegExp:buildFormattingTokensRegExp(formatters)}}function ordinal(number){var rem100=number%100;if(rem100>20||rem100<10){switch(rem100%10){case 1:return number+"st";case 2:return number+"nd";case 3:return number+"rd"}}return number+"th"}module.exports=buildFormatLocale},function(module,exports){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"];function buildFormattingTokensRegExp(formatters){var formatterKeys=[];for(var key in formatters){if(formatters.hasOwnProperty(key)){formatterKeys.push(key)}}var formattingTokens=commonFormatterKeys.concat(formatterKeys).sort().reverse();var formattingTokensRegExp=new RegExp("(\\[[^\\[]*\\])|(\\\\)?"+"("+formattingTokens.join("|")+"|.)","g");return formattingTokensRegExp}module.exports=buildFormattingTokensRegExp},function(module,exports,__webpack_require__){var compareDesc=__webpack_require__(26);var parse=__webpack_require__(2);var differenceInSeconds=__webpack_require__(42);var enLocale=__webpack_require__(46);var MINUTES_IN_DAY=1440;var MINUTES_IN_MONTH=43200;var MINUTES_IN_YEAR=525600;function distanceInWordsStrict(dirtyDateToCompare,dirtyDate,dirtyOptions){var options=dirtyOptions||{};var comparison=compareDesc(dirtyDateToCompare,dirtyDate);var locale=options.locale;var localize=enLocale.distanceInWords.localize;if(locale&&locale.distanceInWords&&locale.distanceInWords.localize){localize=locale.distanceInWords.localize}var localizeOptions={addSuffix:Boolean(options.addSuffix),comparison:comparison};var dateLeft,dateRight;if(comparison>0){dateLeft=parse(dirtyDateToCompare);dateRight=parse(dirtyDate)}else{dateLeft=parse(dirtyDate);dateRight=parse(dirtyDateToCompare)}var unit;var mathPartial=Math[options.partialMethod?String(options.partialMethod):"floor"];var seconds=differenceInSeconds(dateRight,dateLeft);var offset=dateRight.getTimezoneOffset()-dateLeft.getTimezoneOffset();var minutes=mathPartial(seconds/60)-offset;var hours,days,months,years;if(options.unit){unit=String(options.unit)}else{if(minutes<1){unit="s"}else if(minutes<60){unit="m"}else if(minutes<MINUTES_IN_DAY){unit="h"}else if(minutes<MINUTES_IN_MONTH){unit="d"}else if(minutes<MINUTES_IN_YEAR){unit="M"}else{unit="Y"}}if(unit==="s"){return localize("xSeconds",seconds,localizeOptions)}else if(unit==="m"){return localize("xMinutes",minutes,localizeOptions)}else if(unit==="h"){hours=mathPartial(minutes/60);return localize("xHours",hours,localizeOptions)}else if(unit==="d"){days=mathPartial(minutes/MINUTES_IN_DAY);return localize("xDays",days,localizeOptions)}else if(unit==="M"){months=mathPartial(minutes/MINUTES_IN_MONTH);return localize("xMonths",months,localizeOptions)}else if(unit==="Y"){years=mathPartial(minutes/MINUTES_IN_YEAR);return localize("xYears",years,localizeOptions)}throw new Error("Unknown unit: "+unit)}module.exports=distanceInWordsStrict},function(module,exports,__webpack_require__){var distanceInWords=__webpack_require__(45);function distanceInWordsToNow(dirtyDate,dirtyOptions){return distanceInWords(Date.now(),dirtyDate,dirtyOptions)}module.exports=distanceInWordsToNow},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function eachDay(dirtyStartDate,dirtyEndDate,dirtyStep){var startDate=parse(dirtyStartDate);var endDate=parse(dirtyEndDate);var step=dirtyStep!==undefined?dirtyStep:1;var endTime=endDate.getTime();if(startDate.getTime()>endTime){throw new Error("The first date cannot be after the second date")}var dates=[];var currentDate=startDate;currentDate.setHours(0,0,0,0);while(currentDate.getTime()<=endTime){dates.push(parse(currentDate));currentDate.setDate(currentDate.getDate()+step)}return dates}module.exports=eachDay},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function endOfDay(dirtyDate){var date=parse(dirtyDate);date.setHours(23,59,59,999);return date}module.exports=endOfDay},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function endOfHour(dirtyDate){var date=parse(dirtyDate);date.setMinutes(59,59,999);return date}module.exports=endOfHour},function(module,exports,__webpack_require__){var endOfWeek=__webpack_require__(56);function endOfISOWeek(dirtyDate){return endOfWeek(dirtyDate,{weekStartsOn:1})}module.exports=endOfISOWeek},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function endOfWeek(dirtyDate,dirtyOptions){var weekStartsOn=dirtyOptions?Number(dirtyOptions.weekStartsOn)||0:0;var date=parse(dirtyDate);var day=date.getDay();var diff=(day<weekStartsOn?-7:0)+6-(day-weekStartsOn);date.setDate(date.getDate()+diff);date.setHours(23,59,59,999);return date}module.exports=endOfWeek},function(module,exports,__webpack_require__){var getISOYear=__webpack_require__(8);var startOfISOWeek=__webpack_require__(9);function endOfISOYear(dirtyDate){var year=getISOYear(dirtyDate);var fourthOfJanuaryOfNextYear=new Date(0);fourthOfJanuaryOfNextYear.setFullYear(year+1,0,4);fourthOfJanuaryOfNextYear.setHours(0,0,0,0);var date=startOfISOWeek(fourthOfJanuaryOfNextYear);date.setMilliseconds(date.getMilliseconds()-1);return date}module.exports=endOfISOYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function endOfMinute(dirtyDate){var date=parse(dirtyDate);date.setSeconds(59,999);return date}module.exports=endOfMinute},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function endOfMonth(dirtyDate){var date=parse(dirtyDate);var month=date.getMonth();date.setFullYear(date.getFullYear(),month+1,0);date.setHours(23,59,59,999);return date}module.exports=endOfMonth},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function endOfQuarter(dirtyDate){var date=parse(dirtyDate);var currentMonth=date.getMonth();var month=currentMonth-currentMonth%3+3;date.setMonth(month,0);date.setHours(23,59,59,999);return date}module.exports=endOfQuarter},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function endOfSecond(dirtyDate){var date=parse(dirtyDate);date.setMilliseconds(999);return date}module.exports=endOfSecond},function(module,exports,__webpack_require__){var endOfDay=__webpack_require__(53);function endOfToday(){return endOfDay(new Date)}module.exports=endOfToday},function(module,exports){function endOfTomorrow(){var now=new Date;var year=now.getFullYear();var month=now.getMonth();var day=now.getDate();var date=new Date(0);date.setFullYear(year,month,day+1);date.setHours(23,59,59,999);return date}module.exports=endOfTomorrow},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function endOfYear(dirtyDate){var date=parse(dirtyDate);var year=date.getFullYear();date.setFullYear(year+1,0,0);date.setHours(23,59,59,999);return date}module.exports=endOfYear},function(module,exports){function endOfYesterday(){var now=new Date;var year=now.getFullYear();var month=now.getMonth();var day=now.getDate();var date=new Date(0);date.setFullYear(year,month,day-1);date.setHours(23,59,59,999);return date}module.exports=endOfYesterday},function(module,exports,__webpack_require__){var getDayOfYear=__webpack_require__(67);var getISOWeek=__webpack_require__(69);var getISOYear=__webpack_require__(8);var parse=__webpack_require__(2);var isValid=__webpack_require__(70);var enLocale=__webpack_require__(46);function format(dirtyDate,dirtyFormatStr,dirtyOptions){var formatStr=dirtyFormatStr?String(dirtyFormatStr):"YYYY-MM-DDTHH:mm:ss.SSSZ";var options=dirtyOptions||{};var locale=options.locale;var localeFormatters=enLocale.format.formatters;var formattingTokensRegExp=enLocale.format.formattingTokensRegExp;if(locale&&locale.format&&locale.format.formatters){localeFormatters=locale.format.formatters;if(locale.format.formattingTokensRegExp){formattingTokensRegExp=locale.format.formattingTokensRegExp}}var date=parse(dirtyDate);if(!isValid(date)){return"Invalid Date"}var formatFn=buildFormatFn(formatStr,localeFormatters,formattingTokensRegExp);return formatFn(date)}var formatters={M:function(date){return date.getMonth()+1},MM:function(date){return addLeadingZeros(date.getMonth()+1,2)},Q:function(date){return Math.ceil((date.getMonth()+1)/3)},D:function(date){return date.getDate()},DD:function(date){return addLeadingZeros(date.getDate(),2)},DDD:function(date){return getDayOfYear(date)},DDDD:function(date){return addLeadingZeros(getDayOfYear(date),3)},d:function(date){return date.getDay()},E:function(date){return date.getDay()||7},W:function(date){return getISOWeek(date)},WW:function(date){return addLeadingZeros(getISOWeek(date),2)},YY:function(date){return addLeadingZeros(date.getFullYear(),4).substr(2)},YYYY:function(date){return addLeadingZeros(date.getFullYear(),4)},GG:function(date){return String(getISOYear(date)).substr(2)},GGGG:function(date){return getISOYear(date)},H:function(date){return date.getHours()},HH:function(date){return addLeadingZeros(date.getHours(),2)},h:function(date){var hours=date.getHours();if(hours===0){return 12}else if(hours>12){return hours%12}else{return hours}},hh:function(date){return addLeadingZeros(formatters["h"](date),2)},m:function(date){return date.getMinutes()},mm:function(date){return addLeadingZeros(date.getMinutes(),2)},s:function(date){return date.getSeconds()},ss:function(date){return addLeadingZeros(date.getSeconds(),2)},S:function(date){return Math.floor(date.getMilliseconds()/100)},SS:function(date){return addLeadingZeros(Math.floor(date.getMilliseconds()/10),2)},SSS:function(date){return addLeadingZeros(date.getMilliseconds(),3)},Z:function(date){return formatTimezone(date.getTimezoneOffset(),":")},ZZ:function(date){return formatTimezone(date.getTimezoneOffset())},X:function(date){return Math.floor(date.getTime()/1e3)},x:function(date){return date.getTime()}};function buildFormatFn(formatStr,localeFormatters,formattingTokensRegExp){var array=formatStr.match(formattingTokensRegExp);var length=array.length;var i;var formatter;for(i=0;i<length;i++){formatter=localeFormatters[array[i]]||formatters[array[i]];if(formatter){array[i]=formatter}else{array[i]=removeFormattingTokens(array[i])}}return function(date){var output="";for(var i=0;i<length;i++){if(array[i]instanceof Function){output+=array[i](date,formatters)}else{output+=array[i]}}return output}}function removeFormattingTokens(input){if(input.match(/\[[\s\S]/)){return input.replace(/^\[|]$/g,"")}return input.replace(/\\/g,"")}function formatTimezone(offset,delimeter){delimeter=delimeter||"";var sign=offset>0?"-":"+";var absOffset=Math.abs(offset);var hours=Math.floor(absOffset/60);var minutes=absOffset%60;return sign+addLeadingZeros(hours,2)+delimeter+addLeadingZeros(minutes,2)}function addLeadingZeros(number,targetLength){var output=Math.abs(number).toString();while(output.length<targetLength){output="0"+output}return output}module.exports=format},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var startOfYear=__webpack_require__(68);var differenceInCalendarDays=__webpack_require__(13);function getDayOfYear(dirtyDate){var date=parse(dirtyDate);var diff=differenceInCalendarDays(date,startOfYear(date));var dayOfYear=diff+1;return dayOfYear}module.exports=getDayOfYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function startOfYear(dirtyDate){var cleanDate=parse(dirtyDate);var date=new Date(0);date.setFullYear(cleanDate.getFullYear(),0,1);date.setHours(0,0,0,0);return date}module.exports=startOfYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var startOfISOWeek=__webpack_require__(9);var startOfISOYear=__webpack_require__(12);var MILLISECONDS_IN_WEEK=6048e5;function getISOWeek(dirtyDate){var date=parse(dirtyDate);var diff=startOfISOWeek(date).getTime()-startOfISOYear(date).getTime();return Math.round(diff/MILLISECONDS_IN_WEEK)+1}module.exports=getISOWeek},function(module,exports,__webpack_require__){var isDate=__webpack_require__(4);function isValid(dirtyDate){if(isDate(dirtyDate)){return!isNaN(dirtyDate)}else{throw new TypeError(toString.call(dirtyDate)+" is not an instance of Date")}}module.exports=isValid},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getDate(dirtyDate){var date=parse(dirtyDate);var dayOfMonth=date.getDate();return dayOfMonth}module.exports=getDate},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getDay(dirtyDate){var date=parse(dirtyDate);var day=date.getDay();return day}module.exports=getDay},function(module,exports,__webpack_require__){var isLeapYear=__webpack_require__(74);function getDaysInYear(dirtyDate){return isLeapYear(dirtyDate)?366:365}module.exports=getDaysInYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isLeapYear(dirtyDate){var date=parse(dirtyDate);var year=date.getFullYear();return year%400===0||year%4===0&&year%100!==0}module.exports=isLeapYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getHours(dirtyDate){var date=parse(dirtyDate);var hours=date.getHours();return hours}module.exports=getHours},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getISODay(dirtyDate){var date=parse(dirtyDate);var day=date.getDay();if(day===0){day=7}return day}module.exports=getISODay},function(module,exports,__webpack_require__){var startOfISOYear=__webpack_require__(12);var addWeeks=__webpack_require__(20);var MILLISECONDS_IN_WEEK=6048e5;function getISOWeeksInYear(dirtyDate){var thisYear=startOfISOYear(dirtyDate);var nextYear=startOfISOYear(addWeeks(thisYear,60));var diff=nextYear.valueOf()-thisYear.valueOf();return Math.round(diff/MILLISECONDS_IN_WEEK)}module.exports=getISOWeeksInYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getMilliseconds(dirtyDate){var date=parse(dirtyDate);var milliseconds=date.getMilliseconds();return milliseconds}module.exports=getMilliseconds},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getMinutes(dirtyDate){var date=parse(dirtyDate);var minutes=date.getMinutes();return minutes}module.exports=getMinutes},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getMonth(dirtyDate){var date=parse(dirtyDate);var month=date.getMonth();return month}module.exports=getMonth},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var MILLISECONDS_IN_DAY=24*60*60*1e3;function getOverlappingDaysInRanges(dirtyInitialRangeStartDate,dirtyInitialRangeEndDate,dirtyComparedRangeStartDate,dirtyComparedRangeEndDate){var initialStartTime=parse(dirtyInitialRangeStartDate).getTime();var initialEndTime=parse(dirtyInitialRangeEndDate).getTime();var comparedStartTime=parse(dirtyComparedRangeStartDate).getTime();var comparedEndTime=parse(dirtyComparedRangeEndDate).getTime();if(initialStartTime>initialEndTime||comparedStartTime>comparedEndTime){throw new Error("The start of the range cannot be after the end of the range")}var isOverlapping=initialStartTime<comparedEndTime&&comparedStartTime<initialEndTime;if(!isOverlapping){return 0}var overlapStartDate=comparedStartTime<initialStartTime?initialStartTime:comparedStartTime;var overlapEndDate=comparedEndTime>initialEndTime?initialEndTime:comparedEndTime;var differenceInMs=overlapEndDate-overlapStartDate;return Math.ceil(differenceInMs/MILLISECONDS_IN_DAY)}module.exports=getOverlappingDaysInRanges},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getSeconds(dirtyDate){var date=parse(dirtyDate);var seconds=date.getSeconds();return seconds}module.exports=getSeconds},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getTime(dirtyDate){var date=parse(dirtyDate);var timestamp=date.getTime();return timestamp}module.exports=getTime},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function getYear(dirtyDate){var date=parse(dirtyDate);var year=date.getFullYear();return year}module.exports=getYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isAfter(dirtyDate,dirtyDateToCompare){var date=parse(dirtyDate);var dateToCompare=parse(dirtyDateToCompare);return date.getTime()>dateToCompare.getTime()}module.exports=isAfter},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isBefore(dirtyDate,dirtyDateToCompare){var date=parse(dirtyDate);var dateToCompare=parse(dirtyDateToCompare);return date.getTime()<dateToCompare.getTime()}module.exports=isBefore},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isEqual(dirtyLeftDate,dirtyRightDate){var dateLeft=parse(dirtyLeftDate);var dateRight=parse(dirtyRightDate);return dateLeft.getTime()===dateRight.getTime()}module.exports=isEqual},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isFirstDayOfMonth(dirtyDate){return parse(dirtyDate).getDate()===1}module.exports=isFirstDayOfMonth},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isFriday(dirtyDate){return parse(dirtyDate).getDay()===5}module.exports=isFriday},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isFuture(dirtyDate){return parse(dirtyDate).getTime()>(new Date).getTime()}module.exports=isFuture},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var endOfDay=__webpack_require__(53);var endOfMonth=__webpack_require__(59);function isLastDayOfMonth(dirtyDate){var date=parse(dirtyDate);return endOfDay(date).getTime()===endOfMonth(date).getTime()}module.exports=isLastDayOfMonth},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isMonday(dirtyDate){return parse(dirtyDate).getDay()===1}module.exports=isMonday},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isPast(dirtyDate){return parse(dirtyDate).getTime()<(new Date).getTime()}module.exports=isPast},function(module,exports,__webpack_require__){var startOfDay=__webpack_require__(14);function isSameDay(dirtyDateLeft,dirtyDateRight){var dateLeftStartOfDay=startOfDay(dirtyDateLeft);var dateRightStartOfDay=startOfDay(dirtyDateRight);return dateLeftStartOfDay.getTime()===dateRightStartOfDay.getTime()}module.exports=isSameDay},function(module,exports,__webpack_require__){var startOfHour=__webpack_require__(96);function isSameHour(dirtyDateLeft,dirtyDateRight){var dateLeftStartOfHour=startOfHour(dirtyDateLeft);var dateRightStartOfHour=startOfHour(dirtyDateRight);return dateLeftStartOfHour.getTime()===dateRightStartOfHour.getTime()}module.exports=isSameHour},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function startOfHour(dirtyDate){var date=parse(dirtyDate);date.setMinutes(0,0,0);return date}module.exports=startOfHour},function(module,exports,__webpack_require__){var isSameWeek=__webpack_require__(98);function isSameISOWeek(dirtyDateLeft,dirtyDateRight){return isSameWeek(dirtyDateLeft,dirtyDateRight,{weekStartsOn:1})}module.exports=isSameISOWeek},function(module,exports,__webpack_require__){var startOfWeek=__webpack_require__(10);function isSameWeek(dirtyDateLeft,dirtyDateRight,dirtyOptions){var dateLeftStartOfWeek=startOfWeek(dirtyDateLeft,dirtyOptions);var dateRightStartOfWeek=startOfWeek(dirtyDateRight,dirtyOptions);return dateLeftStartOfWeek.getTime()===dateRightStartOfWeek.getTime()}module.exports=isSameWeek},function(module,exports,__webpack_require__){var startOfISOYear=__webpack_require__(12);function isSameISOYear(dirtyDateLeft,dirtyDateRight){var dateLeftStartOfYear=startOfISOYear(dirtyDateLeft);var dateRightStartOfYear=startOfISOYear(dirtyDateRight);return dateLeftStartOfYear.getTime()===dateRightStartOfYear.getTime()}module.exports=isSameISOYear},function(module,exports,__webpack_require__){var startOfMinute=__webpack_require__(101);function isSameMinute(dirtyDateLeft,dirtyDateRight){var dateLeftStartOfMinute=startOfMinute(dirtyDateLeft);var dateRightStartOfMinute=startOfMinute(dirtyDateRight);return dateLeftStartOfMinute.getTime()===dateRightStartOfMinute.getTime()}module.exports=isSameMinute},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function startOfMinute(dirtyDate){var date=parse(dirtyDate);date.setSeconds(0,0);return date}module.exports=startOfMinute},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isSameMonth(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var dateRight=parse(dirtyDateRight);return dateLeft.getFullYear()===dateRight.getFullYear()&&dateLeft.getMonth()===dateRight.getMonth()}module.exports=isSameMonth},function(module,exports,__webpack_require__){var startOfQuarter=__webpack_require__(104);function isSameQuarter(dirtyDateLeft,dirtyDateRight){var dateLeftStartOfQuarter=startOfQuarter(dirtyDateLeft);var dateRightStartOfQuarter=startOfQuarter(dirtyDateRight);return dateLeftStartOfQuarter.getTime()===dateRightStartOfQuarter.getTime()}module.exports=isSameQuarter},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function startOfQuarter(dirtyDate){var date=parse(dirtyDate);var currentMonth=date.getMonth();var month=currentMonth-currentMonth%3;date.setMonth(month,1);date.setHours(0,0,0,0);return date}module.exports=startOfQuarter},function(module,exports,__webpack_require__){var startOfSecond=__webpack_require__(106);function isSameSecond(dirtyDateLeft,dirtyDateRight){var dateLeftStartOfSecond=startOfSecond(dirtyDateLeft);var dateRightStartOfSecond=startOfSecond(dirtyDateRight);return dateLeftStartOfSecond.getTime()===dateRightStartOfSecond.getTime()}module.exports=isSameSecond},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function startOfSecond(dirtyDate){var date=parse(dirtyDate);date.setMilliseconds(0);return date}module.exports=startOfSecond},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isSameYear(dirtyDateLeft,dirtyDateRight){var dateLeft=parse(dirtyDateLeft);var dateRight=parse(dirtyDateRight);return dateLeft.getFullYear()===dateRight.getFullYear()}module.exports=isSameYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isSaturday(dirtyDate){return parse(dirtyDate).getDay()===6}module.exports=isSaturday},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isSunday(dirtyDate){return parse(dirtyDate).getDay()===0}module.exports=isSunday},function(module,exports,__webpack_require__){var isSameHour=__webpack_require__(95);function isThisHour(dirtyDate){return isSameHour(new Date,dirtyDate)}module.exports=isThisHour},function(module,exports,__webpack_require__){var isSameISOWeek=__webpack_require__(97);function isThisISOWeek(dirtyDate){return isSameISOWeek(new Date,dirtyDate)}module.exports=isThisISOWeek},function(module,exports,__webpack_require__){var isSameISOYear=__webpack_require__(99);function isThisISOYear(dirtyDate){return isSameISOYear(new Date,dirtyDate)}module.exports=isThisISOYear},function(module,exports,__webpack_require__){var isSameMinute=__webpack_require__(100);function isThisMinute(dirtyDate){return isSameMinute(new Date,dirtyDate)}module.exports=isThisMinute},function(module,exports,__webpack_require__){var isSameMonth=__webpack_require__(102);function isThisMonth(dirtyDate){return isSameMonth(new Date,dirtyDate)}module.exports=isThisMonth},function(module,exports,__webpack_require__){var isSameQuarter=__webpack_require__(103);function isThisQuarter(dirtyDate){return isSameQuarter(new Date,dirtyDate)}module.exports=isThisQuarter},function(module,exports,__webpack_require__){var isSameSecond=__webpack_require__(105);function isThisSecond(dirtyDate){return isSameSecond(new Date,dirtyDate)}module.exports=isThisSecond},function(module,exports,__webpack_require__){var isSameWeek=__webpack_require__(98);function isThisWeek(dirtyDate,dirtyOptions){return isSameWeek(new Date,dirtyDate,dirtyOptions)}module.exports=isThisWeek},function(module,exports,__webpack_require__){var isSameYear=__webpack_require__(107);function isThisYear(dirtyDate){return isSameYear(new Date,dirtyDate)}module.exports=isThisYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isThursday(dirtyDate){return parse(dirtyDate).getDay()===4}module.exports=isThursday},function(module,exports,__webpack_require__){var startOfDay=__webpack_require__(14);function isToday(dirtyDate){return startOfDay(dirtyDate).getTime()===startOfDay(new Date).getTime()}module.exports=isToday},function(module,exports,__webpack_require__){var startOfDay=__webpack_require__(14);function isTomorrow(dirtyDate){var tomorrow=new Date;tomorrow.setDate(tomorrow.getDate()+1);return startOfDay(dirtyDate).getTime()===startOfDay(tomorrow).getTime()}module.exports=isTomorrow},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isTuesday(dirtyDate){return parse(dirtyDate).getDay()===2}module.exports=isTuesday},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isWednesday(dirtyDate){return parse(dirtyDate).getDay()===3}module.exports=isWednesday},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isWeekend(dirtyDate){var date=parse(dirtyDate);var day=date.getDay();return day===0||day===6}module.exports=isWeekend},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function isWithinRange(dirtyDate,dirtyStartDate,dirtyEndDate){var time=parse(dirtyDate).getTime();var startTime=parse(dirtyStartDate).getTime();var endTime=parse(dirtyEndDate).getTime();if(startTime>endTime){throw new Error("The start of the range cannot be after the end of the range")}return time>=startTime&&time<=endTime}module.exports=isWithinRange},function(module,exports,__webpack_require__){var startOfDay=__webpack_require__(14);function isYesterday(dirtyDate){var yesterday=new Date;yesterday.setDate(yesterday.getDate()-1);return startOfDay(dirtyDate).getTime()===startOfDay(yesterday).getTime()}module.exports=isYesterday},function(module,exports,__webpack_require__){var lastDayOfWeek=__webpack_require__(128);function lastDayOfISOWeek(dirtyDate){return lastDayOfWeek(dirtyDate,{weekStartsOn:1})}module.exports=lastDayOfISOWeek},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function lastDayOfWeek(dirtyDate,dirtyOptions){var weekStartsOn=dirtyOptions?Number(dirtyOptions.weekStartsOn)||0:0;var date=parse(dirtyDate);var day=date.getDay();var diff=(day<weekStartsOn?-7:0)+6-(day-weekStartsOn);date.setHours(0,0,0,0);date.setDate(date.getDate()+diff);return date}module.exports=lastDayOfWeek},function(module,exports,__webpack_require__){var getISOYear=__webpack_require__(8);var startOfISOWeek=__webpack_require__(9);function lastDayOfISOYear(dirtyDate){var year=getISOYear(dirtyDate);var fourthOfJanuary=new Date(0);fourthOfJanuary.setFullYear(year+1,0,4);fourthOfJanuary.setHours(0,0,0,0);var date=startOfISOWeek(fourthOfJanuary);date.setDate(date.getDate()-1);return date}module.exports=lastDayOfISOYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function lastDayOfMonth(dirtyDate){var date=parse(dirtyDate);var month=date.getMonth();date.setFullYear(date.getFullYear(),month+1,0);date.setHours(0,0,0,0);return date}module.exports=lastDayOfMonth},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function lastDayOfQuarter(dirtyDate){var date=parse(dirtyDate);var currentMonth=date.getMonth();var month=currentMonth-currentMonth%3+3;date.setMonth(month,0);date.setHours(0,0,0,0);return date}module.exports=lastDayOfQuarter},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function lastDayOfYear(dirtyDate){var date=parse(dirtyDate);var year=date.getFullYear();date.setFullYear(year+1,0,0);date.setHours(0,0,0,0);return date}module.exports=lastDayOfYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function max(){var dirtyDates=Array.prototype.slice.call(arguments);var dates=dirtyDates.map(function(dirtyDate){return parse(dirtyDate)});var latestTimestamp=Math.max.apply(null,dates);return new Date(latestTimestamp)}module.exports=max},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function min(){var dirtyDates=Array.prototype.slice.call(arguments);var dates=dirtyDates.map(function(dirtyDate){return parse(dirtyDate)});var earliestTimestamp=Math.min.apply(null,dates);return new Date(earliestTimestamp)}module.exports=min},function(module,exports,__webpack_require__){
|
|
var parse=__webpack_require__(2);function setDate(dirtyDate,dirtyDayOfMonth){var date=parse(dirtyDate);var dayOfMonth=Number(dirtyDayOfMonth);date.setDate(dayOfMonth);return date}module.exports=setDate},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var addDays=__webpack_require__(1);function setDay(dirtyDate,dirtyDay,dirtyOptions){var weekStartsOn=dirtyOptions?Number(dirtyOptions.weekStartsOn)||0:0;var date=parse(dirtyDate);var day=Number(dirtyDay);var currentDay=date.getDay();var remainder=day%7;var dayIndex=(remainder+7)%7;var diff=(dayIndex<weekStartsOn?7:0)+day-currentDay;return addDays(date,diff)}module.exports=setDay},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function setDayOfYear(dirtyDate,dirtyDayOfYear){var date=parse(dirtyDate);var dayOfYear=Number(dirtyDayOfYear);date.setMonth(0);date.setDate(dayOfYear);return date}module.exports=setDayOfYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function setHours(dirtyDate,dirtyHours){var date=parse(dirtyDate);var hours=Number(dirtyHours);date.setHours(hours);return date}module.exports=setHours},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var addDays=__webpack_require__(1);var getISODay=__webpack_require__(76);function setISODay(dirtyDate,dirtyDay){var date=parse(dirtyDate);var day=Number(dirtyDay);var currentDay=getISODay(date);var diff=day-currentDay;return addDays(date,diff)}module.exports=setISODay},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var getISOWeek=__webpack_require__(69);function setISOWeek(dirtyDate,dirtyISOWeek){var date=parse(dirtyDate);var isoWeek=Number(dirtyISOWeek);var diff=getISOWeek(date)-isoWeek;date.setDate(date.getDate()-diff*7);return date}module.exports=setISOWeek},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function setMilliseconds(dirtyDate,dirtyMilliseconds){var date=parse(dirtyDate);var milliseconds=Number(dirtyMilliseconds);date.setMilliseconds(milliseconds);return date}module.exports=setMilliseconds},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function setMinutes(dirtyDate,dirtyMinutes){var date=parse(dirtyDate);var minutes=Number(dirtyMinutes);date.setMinutes(minutes);return date}module.exports=setMinutes},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var getDaysInMonth=__webpack_require__(17);function setMonth(dirtyDate,dirtyMonth){var date=parse(dirtyDate);var month=Number(dirtyMonth);var year=date.getFullYear();var day=date.getDate();var dateWithDesiredMonth=new Date(0);dateWithDesiredMonth.setFullYear(year,month,15);dateWithDesiredMonth.setHours(0,0,0,0);var daysInMonth=getDaysInMonth(dateWithDesiredMonth);date.setMonth(month,Math.min(day,daysInMonth));return date}module.exports=setMonth},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);var setMonth=__webpack_require__(143);function setQuarter(dirtyDate,dirtyQuarter){var date=parse(dirtyDate);var quarter=Number(dirtyQuarter);var oldQuarter=Math.floor(date.getMonth()/3)+1;var diff=quarter-oldQuarter;return setMonth(date,date.getMonth()+diff*3)}module.exports=setQuarter},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function setSeconds(dirtyDate,dirtySeconds){var date=parse(dirtyDate);var seconds=Number(dirtySeconds);date.setSeconds(seconds);return date}module.exports=setSeconds},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function setYear(dirtyDate,dirtyYear){var date=parse(dirtyDate);var year=Number(dirtyYear);date.setFullYear(year);return date}module.exports=setYear},function(module,exports,__webpack_require__){var parse=__webpack_require__(2);function startOfMonth(dirtyDate){var date=parse(dirtyDate);date.setDate(1);date.setHours(0,0,0,0);return date}module.exports=startOfMonth},function(module,exports,__webpack_require__){var startOfDay=__webpack_require__(14);function startOfToday(){return startOfDay(new Date)}module.exports=startOfToday},function(module,exports){function startOfTomorrow(){var now=new Date;var year=now.getFullYear();var month=now.getMonth();var day=now.getDate();var date=new Date(0);date.setFullYear(year,month,day+1);date.setHours(0,0,0,0);return date}module.exports=startOfTomorrow},function(module,exports){function startOfYesterday(){var now=new Date;var year=now.getFullYear();var month=now.getMonth();var day=now.getDate();var date=new Date(0);date.setFullYear(year,month,day-1);date.setHours(0,0,0,0);return date}module.exports=startOfYesterday},function(module,exports,__webpack_require__){var addDays=__webpack_require__(1);function subDays(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addDays(dirtyDate,-amount)}module.exports=subDays},function(module,exports,__webpack_require__){var addHours=__webpack_require__(5);function subHours(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addHours(dirtyDate,-amount)}module.exports=subHours},function(module,exports,__webpack_require__){var addMilliseconds=__webpack_require__(6);function subMilliseconds(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addMilliseconds(dirtyDate,-amount)}module.exports=subMilliseconds},function(module,exports,__webpack_require__){var addMinutes=__webpack_require__(15);function subMinutes(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addMinutes(dirtyDate,-amount)}module.exports=subMinutes},function(module,exports,__webpack_require__){var addMonths=__webpack_require__(16);function subMonths(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addMonths(dirtyDate,-amount)}module.exports=subMonths},function(module,exports,__webpack_require__){var addQuarters=__webpack_require__(18);function subQuarters(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addQuarters(dirtyDate,-amount)}module.exports=subQuarters},function(module,exports,__webpack_require__){var addSeconds=__webpack_require__(19);function subSeconds(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addSeconds(dirtyDate,-amount)}module.exports=subSeconds},function(module,exports,__webpack_require__){var addWeeks=__webpack_require__(20);function subWeeks(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addWeeks(dirtyDate,-amount)}module.exports=subWeeks},function(module,exports,__webpack_require__){var addYears=__webpack_require__(21);function subYears(dirtyDate,dirtyAmount){var amount=Number(dirtyAmount);return addYears(dirtyDate,-amount)}module.exports=subYears}])});
|
|
//# sourceMappingURL=date_fns.min.js.map
|