miment.js.map 18.3 KB
{"version":3,"file":"miment.js","sources":["../src/miment.js"],"sourcesContent":["// polyfill\nObject.setPrototypeOf = Object.setPrototypeOf ||\n  function (obj, proto) {\n    // eslint-disable-next-line\n    obj.__proto__ = proto\n    return obj\n  }\n\n/**\n * Miment 对象\n */\nfunction Miment () {\n  // 兼容苹果系统不识别 2018-01-01 的问题\n  const arg = arguments[0]\n  const isNormalDatetimeReg = /^[\\d-: ]*$/\n  if (typeof arg === 'string' && isNormalDatetimeReg.test(arg)) {\n    arguments[0] = arg.replace(/-/g, '/')\n  }\n\n  // bind 属于 Function.prototype\n  // 接收参数形如 object, param1, params2...\n  var dateInst = new (Function.prototype.bind.apply(Date, [Date].concat(Array.prototype.slice.call(arguments))))()\n  // 更改原型指向,否则无法调用 Miment 原型上的方法\n  // ES6 方案中,这里就是 [[prototype]] 隐式原型对象,在没有标准以前就是 __proto__\n  Object.setPrototypeOf(dateInst, Miment.prototype)\n  // 原型重新指回 Date\n  Object.setPrototypeOf(Miment.prototype, Date.prototype)\n  return dateInst\n}\n\n// 转换成星期的数组\nconst weekArray = ['日', '一', '二', '三', '四', '五', '六']\n\n// 格式化时间\nfunction format (formatter = 'YYYY-MM-DD hh:mm:ss', distance = false) {\n  let year, month, day, hour, minute, second, weekDay, millisecond\n\n  if (distance) {\n    let dtBegin, dtEnd\n    if (this.__distance_begin__ > this.__distance_end__) {\n      dtBegin = Miment(this.__distance_begin__)\n      dtEnd = Miment(this.__distance_end__)\n    } else {\n      dtBegin = Miment(this.__distance_end__)\n      dtEnd = Miment(this.__distance_begin__)\n    }\n    // 时间差的格式化\n    year = dtBegin.getFullYear() - dtEnd.getFullYear()\n    month = dtBegin.getMonth() - dtEnd.getMonth()\n    day = dtBegin.getDate() - dtEnd.getDate()\n    hour = dtBegin.getHours() - dtEnd.getHours()\n    minute = dtBegin.getMinutes() - dtEnd.getMinutes()\n    second = dtBegin.getSeconds() - dtEnd.getSeconds()\n    weekDay = Math.abs(dtBegin.getDay() - dtEnd.getDay())\n    millisecond = Math.abs(dtBegin.getMilliseconds() - dtEnd.getMilliseconds())\n    if (millisecond < 0) {\n      millisecond += 1000\n      second--\n    }\n    if (second < 0) {\n      second += 60\n      minute--\n    }\n    if (minute < 0) {\n      minute += 60\n      hour--\n    }\n    if (hour < 0) {\n      hour += 24\n      day--\n    }\n    if (day < 0) {\n      day += dtEnd.daysInMonth()\n      month--\n    }\n    if (month < 0) {\n      month += 12\n      year--\n    }\n  } else {\n    // 普通的格式化\n    year = this.getFullYear()\n    month = this.getMonth() + 1\n    day = this.getDate()\n    hour = this.getHours()\n    minute = this.getMinutes()\n    second = this.getSeconds()\n    weekDay = this.getDay()\n    millisecond = this.getMilliseconds()\n  }\n  // 替换并返回格式化后的值\n  formatter = formatter\n    .replace('YYYY', year)\n    .replace('MM', String(month)[1] ? month : `0${month}`)\n    .replace('DD', String(day)[1] ? day : `0${day}`)\n    .replace('hh', String(hour)[1] ? hour : `0${hour}`)\n    .replace('mm', String(minute)[1] ? minute : `0${minute}`)\n    .replace('ss', String(second)[1] ? second : `0${second}`)\n    .replace('SSS', millisecond)\n    .replace('ww', weekDay)\n  formatter = distance ? formatter.replace('WW', weekDay) : formatter.replace('WW', weekArray[weekDay])\n  return formatter\n}\n\n// 将时间转换为 JSON 对象\nfunction json () {\n  let year = this.getFullYear()\n  let month = this.getMonth() + 1\n  let date = this.getDate()\n\n  let hour = this.getHours()\n  let minute = this.getMinutes()\n  let second = this.getSeconds()\n  let day = this.getDay()\n  let millisecond = this.getMilliseconds()\n  return {\n    year: year,\n    month: month,\n    date: date,\n    hour: hour,\n    minute: minute,\n    second: second,\n    day: day,\n    millisecond: millisecond\n  }\n}\n\n// 获取\nfunction _get (unit) {\n  switch (unit) {\n    case 'YYYY': return this.getFullYear()\n    case 'MM': return this.getMonth() + 1\n    case 'DD': return this.getDate()\n    case 'hh': return this.getHours()\n    case 'mm': return this.getMinutes()\n    case 'ss': return this.getSeconds()\n    case 'ww':\n    case 'WW': return this.getDay()\n    case 'SSS': return this.getMilliseconds()\n  }\n  return '00'\n}\n\nfunction get (unit) {\n  let res = String(_get.call(this, unit))\n  return res[1] || unit === 'SSS' || unit === 'millisecond' ? res : `0${res}`\n}\n\n// 转换为时间戳\nfunction stamp () {\n  return this.valueOf()\n}\n\n// 计算2个时间的毫秒差\nfunction diff (dt1, dt2) {\n  if (dt2) {\n    return Miment(dt1).valueOf() - Miment(dt2).valueOf()\n  } else {\n    return this.valueOf() - Miment(dt1).valueOf()\n  }\n}\n\n// 获取当前月的天数\nfunction daysInMonth () {\n  let year = this.getFullYear()\n  let month = this.getMonth() + 1\n  let date = Miment(year, month, 0)\n  return date.getDate()\n}\n\n// 判断当前时间是否早于 参数里的时间\nfunction isBefore (dt) {\n  return this.valueOf() < Miment(dt).valueOf()\n}\n\n// 判断当前时间是否晚于 参数里的时间\nfunction isAfter (dt) {\n  return this.valueOf() > Miment(dt).valueOf()\n}\n\n// 判断当前时间是否在 参数里的2个时间之间\nfunction isBetween (dt1, dt2) {\n  dt1 = Miment(dt1).valueOf()\n  dt2 = Miment(dt2).valueOf()\n  let dt = this.valueOf()\n  return (dt1 > dt && dt2 < dt) || (dt1 < dt && dt2 > dt)\n}\n\n// 内部方法 计算时间\nfunction _calculateTime (amount, unit, isSet) {\n  switch (unit) {\n    case 'YY':\n    case 'YYYY':\n      amount = isSet ? amount : this.getFullYear() + amount\n      this.setFullYear(amount)\n      break\n    case 'MM':\n      amount = isSet ? amount - 1 : this.getMonth() + amount\n      this.setMonth(amount)\n      break\n    case 'DD':\n      amount = isSet ? amount : this.getDate() + amount\n      this.setDate(amount)\n      break\n    case 'hh':\n      amount = isSet ? amount : this.getHours() + amount\n      this.setHours(amount)\n      break\n    case 'mm':\n      amount = isSet ? amount : this.getMinutes() + amount\n      this.setMinutes(amount)\n      break\n    case 'ss':\n      amount = isSet ? amount : this.getSeconds() + amount\n      this.setSeconds(amount)\n      break\n    case 'SSS':\n      amount = isSet ? amount : this.getMilliseconds() + amount\n      this.setMilliseconds(amount)\n      break\n    case 'ww':\n    case 'WW':\n      if (isSet) {\n        this.setMonth(0)\n        this.setDate(1)\n        this.setDate(amount * 7)\n        firstDayOfWeek.call(this)\n      } else {\n        this.setDate(this.getDate() + amount * 7)\n      }\n      break\n  }\n}\n\n// 增加或减少时间\nfunction add (amount, unit) {\n  if (!amount) amount = 0\n  _calculateTime.call(this, amount, unit)\n  return this\n}\n\n// 增加或减少时间\nfunction sub (amount, unit) {\n  if (!amount) amount = 0\n  _calculateTime.call(this, -amount, unit)\n  return this\n}\n// 设置时间\nfunction set (amount, unit) {\n  if (!amount) amount = 0\n  _calculateTime.call(this, amount, unit, true)\n  return this\n}\n// 计算两个时间距离\nfunction distance (dt1, dt2) {\n  let dtBegin, dtEnd\n  if (dt2) {\n    dtBegin = Miment(dt1).valueOf()\n    dtEnd = Miment(dt2).valueOf()\n  } else {\n    dtBegin = this.valueOf()\n    dtEnd = Miment(dt1).valueOf()\n  }\n  let m = Miment(dtBegin - dtEnd)\n  m.__distance_begin__ = dtBegin\n  m.__distance_end__ = dtEnd\n  return m\n}\n\n// 获取每个月的第一天\nfunction firstDay () {\n  let year = this.getFullYear()\n  let month = this.getMonth()\n  return Miment(year, month, 1)\n}\n\n// 获取每个月的最后一天\nfunction lastDay () {\n  let year = this.getFullYear()\n  let month = this.getMonth() + 1\n  return Miment(year, month, 0)\n}\n\n// 获取本周的第一天(周日)\nfunction firstDayOfWeek () {\n  this.setDate(this.getDate() - this.getDay())\n  return this\n}\n\n// 获取起始时间\nfunction startOf (unit = 'DD') {\n  switch (unit) {\n    case 'mm':\n      return Miment(this.format('YYYY-MM-DD hh:mm:00'))\n    case 'hh':\n      return Miment(this.format('YYYY-MM-DD hh:00:00'))\n    case 'DD':\n      return Miment(this.format('YYYY-MM-DD 00:00:00'))\n    case 'ww':\n    case 'WW':\n      return Miment(this.firstDayOfWeek().format('YYYY-MM-DD 00:00:00'))\n    case 'MM':\n      return Miment(this.format('YYYY-MM-01 00:00:00'))\n    case 'YY':\n    case 'YYYY':\n      return Miment(this.format('YYYY-01-01 00:00:00'))\n  }\n}\n\n// 获取结束时间\nfunction endOf (unit = 'DD') {\n  switch (unit) {\n    case 'mm':\n      return Miment(this.format('YYYY-MM-DD hh:mm:59'))\n    case 'hh':\n      return Miment(this.format('YYYY-MM-DD hh:59:59'))\n    case 'DD':\n      return Miment(this.format('YYYY-MM-DD 23:59:59'))\n    case 'ww':\n    case 'WW':\n      return Miment(this.firstDayOfWeek().add(6, 'DD').format('YYYY-MM-DD 23:59:59'))\n    case 'MM':\n      return Miment(this.lastDay().format('YYYY-MM-DD 23:59:59'))\n    case 'YY':\n    case 'YYYY':\n      return Miment(this.set(12, 'MM').lastDay().format('YYYY-MM-DD 23:59:59'))\n  }\n}\n\nMiment.prototype.format = format\nMiment.prototype.stamp = stamp\nMiment.prototype.json = json\nMiment.prototype.get = get\nMiment.prototype.diff = diff\n\nMiment.prototype.isBefore = isBefore\nMiment.prototype.isAfter = isAfter\nMiment.prototype.isBetween = isBetween\n\nMiment.prototype.daysInMonth = daysInMonth\n\nMiment.prototype.add = add\nMiment.prototype.sub = sub\nMiment.prototype.set = set\nMiment.prototype.distance = distance\n\nMiment.prototype.startOf = startOf\nMiment.prototype.endOf = endOf\n\nMiment.prototype.firstDay = firstDay\nMiment.prototype.lastDay = lastDay\nMiment.prototype.firstDayOfWeek = firstDayOfWeek\n\nmodule.exports = Miment\n"],"names":["Object","setPrototypeOf","obj","proto","__proto__","Miment","arg","arguments","isNormalDatetimeReg","test","replace","dateInst","Function","prototype","bind","apply","Date","concat","Array","slice","call","weekArray","format","formatter","distance","year","month","day","hour","minute","second","weekDay","millisecond","dtBegin","dtEnd","__distance_begin__","__distance_end__","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","Math","abs","getDay","getMilliseconds","daysInMonth","String","json","date","_get","unit","get","res","stamp","valueOf","diff","dt1","dt2","isBefore","dt","isAfter","isBetween","_calculateTime","amount","isSet","setFullYear","setMonth","setDate","setHours","setMinutes","setSeconds","setMilliseconds","add","sub","set","m","firstDay","lastDay","firstDayOfWeek","startOf","endOf","module"],"mappings":";;AAAA;AACAA,OAAOC,cAAP,GAAwBD,OAAOC,cAAP,IACtB,UAAUC,GAAV,EAAeC,KAAf,EAAsB;;MAEhBC,SAAJ,GAAgBD,KAAhB;SACOD,GAAP;CAJJ;;;;;AAUA,SAASG,MAAT,GAAmB;;MAEXC,MAAMC,UAAU,CAAV,CAAZ;MACMC,sBAAsB,YAA5B;MACI,OAAOF,GAAP,KAAe,QAAf,IAA2BE,oBAAoBC,IAApB,CAAyBH,GAAzB,CAA/B,EAA8D;cAClD,CAAV,IAAeA,IAAII,OAAJ,CAAY,IAAZ,EAAkB,GAAlB,CAAf;;;;;MAKEC,WAAW,KAAKC,SAASC,SAAT,CAAmBC,IAAnB,CAAwBC,KAAxB,CAA8BC,IAA9B,EAAoC,CAACA,IAAD,EAAOC,MAAP,CAAcC,MAAML,SAAN,CAAgBM,KAAhB,CAAsBC,IAAtB,CAA2Bb,SAA3B,CAAd,CAApC,CAAL,GAAf;;;SAGON,cAAP,CAAsBU,QAAtB,EAAgCN,OAAOQ,SAAvC;;SAEOZ,cAAP,CAAsBI,OAAOQ,SAA7B,EAAwCG,KAAKH,SAA7C;SACOF,QAAP;;;;AAIF,IAAMU,YAAY,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,GAA/B,CAAlB;;;AAGA,SAASC,MAAT,GAAsE;MAArDC,SAAqD,uEAAzC,qBAAyC;MAAlBC,QAAkB,uEAAP,KAAO;;MAChEC,aAAJ;MAAUC,cAAV;MAAiBC,YAAjB;MAAsBC,aAAtB;MAA4BC,eAA5B;MAAoCC,eAApC;MAA4CC,gBAA5C;MAAqDC,oBAArD;;MAEIR,QAAJ,EAAc;QACRS,gBAAJ;QAAaC,cAAb;QACI,KAAKC,kBAAL,GAA0B,KAAKC,gBAAnC,EAA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