写入长日期

@param {Date} value 日期对象
@param {number=} offset 偏移

@return {Date} Date对象
345115
function (value, offset) {

                if (undefined === offset) {
                    offset = this.offset;
                }

                // new Date(1970, 1, 1).getTime() - new Date(1904, 1, 1).getTime();
                var delta = -2077545600000;

                if (typeof value === 'undefined') {
                    value = delta;
                }
                else if (typeof value.getTime === 'function') {
                    value = value.getTime();
                }
                else if (/^\d+$/.test(value)) {
                    value = +value;
                }
                else {
                    value = Date.parse(value);
                }

                var time = Math.round((value - delta) / 1000);
                this.writeUint32(0, offset);
                this.writeUint32(time, offset + 4);

                return this;
            }
452543
def onOffset(self, date):
        """"""
        mod_month = (date.month - self.month) % 3
        return mod_month == 0 and date.day == self._get_offset_day(date)
311665
function utc_offset() {
      if (this.zone == ICAL.Timezone.localTimezone ||
          this.zone == ICAL.Timezone.utcTimezone) {
        return 0;
      } else {
        return this.zone.utcOffset(this);
      }
    }
1116731
private String getDateString(Date value)
   {
      Calendar cal = DateHelper.popCalendar(value);
      int year = cal.get(Calendar.YEAR);
      int month = cal.get(Calendar.MONTH) + 1;
      int day = cal.get(Calendar.DAY_OF_MONTH);
      DateHelper.pushCalendar(cal);
      
      StringBuilder sb = new StringBuilder(8);
      sb.append(m_fourDigitFormat.format(year));
      sb.append(m_twoDigitFormat.format(month));
      sb.append(m_twoDigitFormat.format(day));

      return (sb.toString());
   }
984909
function addTerm (date, value) {
  if ('d' in value || 'h' in value || 'i' in value ||
      's' in value || 'ms' in value) {
    return new Date(
      date.getFullYear()     + (value.y  || 0),
      date.getMonth()        + (value.m  || 0),
      date.getDate()         + (value.d  || 0),
      date.getHours()        + (value.h  || 0),
      date.getMinutes()      + (value.i  || 0),
      date.getSeconds()      + (value.s  || 0),
      date.getMilliseconds() + (value.ms || 0)
    );
  } else if ('y' in value || 'm' in value) {
    var y = date.getFullYear() + (value.y  || 0);
    var m = date.getMonth() + (value.m  || 0);
    var d = Math.min(new Date(y, m + 1, 0).getDate(), date.getDate());
    return new Date(
      y,
      m,
      d,
      date.getHours(),
      date.getMinutes(),
      date.getSeconds(),
      date.getMilliseconds()
    );
  } else {
    return date;
  }
}
494805
public static java.util.Date getDateTime(Object value) {
        try {
            return toDateTime(value);
        } catch (ParseException pe) {
            pe.printStackTrace();
            return null;
        }
    }
17380
public static Calendar read(String value) {
		Date date=DateUtils.read(value);
		
		Calendar calendar=Calendar.getInstance();
		calendar.setTime(date);
		
		return calendar;
	}
890844
public static final Date parseDate(String value)
   {
      Date result = null;

      try
      {
         if (value != null && !value.isEmpty())
         {
            result = DATE_FORMAT.get().parse(value);
         }
      }
      catch (ParseException ex)
      {
         // Ignore
      }

      return result;
   }
436
public static Date toDate(final Object value) {
		if (value instanceof Date) {
			return (Date) value;
		}
		if (value == null || value.equals("null")) {
			return null;
		}
		if (value instanceof String) {
			throw new IllegalStateException("fix me");
		}

		return null;
	}
249701
function noOffset (s) {
  let day = s.slice(0, -5).split(/\D/).map(function (itm) {
    return parseInt(itm, 10) || 0;
  });
  day[1] -= 1;
  day = new Date(Date.UTC.apply(Date, day));
  let offsetString = s.slice(-5);
  let offset = parseInt(offsetString, 10) / 100;
  if (offsetString.slice(0, 1) === '+') offset *= -1;
  day.setHours(day.getHours() + offset);
  return day.getTime();
}
983400
function isSt(date, testOffset) {
      date = date || new Date();
      var offset = testOffset || date.getTimezoneOffset();
      return jsk.hasDst() && offset == jsk.invertedDst();
    }
508358
public static DateTime offsetDay(Date date, int offset) {
		return offset(date, DateField.DAY_OF_YEAR, offset);
	}
541884
public function day($value = null)
    {
        if ($value !== null) {
            if ($value > 31 || $value < 1) {
                $this->day = 1;
            } else {
                $this->day = $value;
            }
        }
        return $this->day;
    }
882867
function convertToTimestamp(value) {
    if (value instanceof Date) {
      return value.getTime();
    } else if (typeof value === 'number') {
      return Math.floor(value);
    } else if (typeof value === 'string') {
      return Date.parse(value);
    } else {
      return NaN;
    }
  }
64504
function cellToDate() {
		var cellOffset = cellToCellOffset.apply(null, arguments);
		var dayOffset = cellOffsetToDayOffset(cellOffset);
		var date = dayOffsetToDate(dayOffset);
		return date;
	}
1301073
function parse (value, now) {
  now = now ? this.toDate(now) : new Date();
  if (!now) {
    return null;
  }
  // 営業日計算
  if (value.indexOf('営業日') !== -1) {
    value = suji(value);
    var matches = value.match(BIZ);
    if (matches) {
      return this.addBiz(now, matches[1] * (matches[2] === '前' ? -1 : 1));
    } else {
      return null;
    }
  // そのほか
  } else {
    return parseFn(value, this.startMonth, this._startWeek, now) ||
           toDatetimeFn(value, this.startMonth);
  }
}
277987
function arrayToDate(value, sm) {
  var v = [0, sm, 1, 0, 0, 0, 0];
  var err = false;
  value.forEach((x, i) => {
    if (i === 7 || typeof x !== 'number') {
      err = true;
    } else {
      v[i] = x;
    }
  });
  return err ? null : new Date(v[0], v[1] - 1, v[2], v[3], v[4], v[5], v[6]);
}