セルに日時を設定する。
<p>1900年1月0日となる経過時間指定の場合は、POIのバグにより設定できあいため、数値として設定する。</p>

@param cell 設定するセル
@param date セルに設定する日時
@param dateStart1904 1904年始まりの設定のシートかどうか
774996
public static void setCellValueAsDate(Cell cell, Date date, boolean dateStart1904) {

        ArgUtils.notNull(cell, "cell");
        ArgUtils.notNull(date, "date");

        if(dateStart1904) {
            // 1904年始まりの場合は、そのまま設定する
            cell.setCellValue(date);

        } else {

            long timemills = date.getTime();
            if(timemills <= MILLISECONDS_19000101_END) {
                // 1900年1月0日の場合は、数値に変換してから設定する
                // タイムゾーンを除去する
                Date strip = new Date(date.getTime() + TimeZone.getDefault().getRawOffset());
                double num = ExcelDateUtils.convertExcelNumber(strip, dateStart1904);
                cell.setCellValue(num);

            } else {
                cell.setCellValue(date);
            }

        }

    }
1146944
public void setDate(Date date)
    {
        String dateString = "";
        if (date != null)
    		dateString = dateFormat.format(date);
        jTextField2.setText(dateString);
        jCalendarButton1.setTargetDate(date);
    }
404873
static String retriveCellValue(Cell cell) {
        String cellValue = "";
        if (cell == null) {
            return cellValue;
        }
        try {
            switch (cell.getCellType()) {
                case Cell.CELL_TYPE_NUMERIC:
                    if (CellDateFormat.isDateCell(cell)) {
                        Date date = cell.getDateCellValue();
                        DateFormat dateFormat = CellDateFormat
                                .getFormat(cell.getCellStyle().getDataFormat()).getDateFormat();
                        cellValue = dateFormat.format(date);
                    } else {
                        cellValue = roundValue(cell.getNumericCellValue());
                    }
                    break;
                case Cell.CELL_TYPE_FORMULA:
                    cellValue = roundValue(cell.getSheet().getWorkbook().getCreationHelper()
                            .createFormulaEvaluator().evaluate(cell).formatAsString());
                    break;
                default:
                    cellValue = cell.getStringCellValue();
            }
        } catch (Exception e) {
            LOG.warn(MessageManager.getMessage("cell.fail"), cell.getRowIndex(),
                    cell.getColumnIndex(), e.getMessage());
        }

        return cellValue;
    }
316110
public void start(final Date start) {
		if (start != null) {
			submit((System.currentTimeMillis() - start.getTime()) / 1000.0, true);
		}
	}
361774
protected void setDate(Date date, boolean firePropertyChange) {
		Date oldDate = this.date;
		this.date = date;

		if (date == null) {
			setText("");
		} else {
			String formattedDate = dateFormatter.format(date);
			try {
				setText(formattedDate);
			} catch (RuntimeException e) {
				e.printStackTrace();
			}
		}
		if (date != null && dateUtil.checkDate(date)) {
			setForeground(Color.BLACK);

		}

		if (firePropertyChange) {
			firePropertyChange("date", oldDate, date);
		}
	}
133750
public void goToDate(Calendar date) {
        mScroller.forceFinished(true);
        mCurrentScrollDirection = mCurrentFlingDirection = Direction.NONE;

        date.set(Calendar.HOUR_OF_DAY, 0);
        date.set(Calendar.MINUTE, 0);
        date.set(Calendar.SECOND, 0);
        date.set(Calendar.MILLISECOND, 0);

        if(mAreDimensionsInvalid) {
            mScrollToDay = date;
            return;
        }

        mRefreshEvents = true;

        Calendar today = Calendar.getInstance();
        today.set(Calendar.HOUR_OF_DAY, 0);
        today.set(Calendar.MINUTE, 0);
        today.set(Calendar.SECOND, 0);
        today.set(Calendar.MILLISECOND, 0);

        long day = 1000L * 60L * 60L * 24L;
        long dateInMillis = date.getTimeInMillis() + date.getTimeZone().getOffset(date.getTimeInMillis());
        long todayInMillis = today.getTimeInMillis() + today.getTimeZone().getOffset(today.getTimeInMillis());
        long dateDifference = (dateInMillis/day) - (todayInMillis/day);
        mCurrentOrigin.x = - dateDifference * (mWidthPerDay + mColumnGap);
        invalidate();
    }
314214
private static Date parse(String date) {
        for (int i = 0; i < fmt.length; i++) {
            try {
                SimpleDateFormat df = new SimpleDateFormat(fmt[i]);
                return df.parse(date);
            } catch (ParseException E) {
                // keep trying
            }
        }
        throw new IllegalArgumentException(date);
    }
293424
function dateToCell(date) {
		var dayOffset = dateToDayOffset(date);
		var cellOffset = dayOffsetToCellOffset(dayOffset);
		var cell = cellOffsetToCell(cellOffset);
		return cell;
	}
1261414
public static Date getFirstDayOfMonth(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        int firstDay = calendar.getActualMinimum(Calendar.DAY_OF_MONTH);
        return org.apache.commons.lang.time.DateUtils.setDays(date, firstDay);
    }
890810
public void start(final Date start) {
		if (start != null) {
			counter.increment();
			timer.start(start);
		}
	}
353178
public static Date parseDate(String date) throws JournalException {
        try {
            SimpleDateFormat parser = new SimpleDateFormat(TIMESTAMP_FORMAT);
            return parser.parse(date);
        } catch (ParseException e) {
            throw new JournalException(e);
        }
    }
321427
public static DateTime getDateTime(final double date, final boolean use1904windowing) {
        final Calendar c = ExcelDateUtil.getJavaCalendar(date, use1904windowing);

        if (c == null) {
            return null;
        }

        return new DateTime().withYear(c.get(Calendar.YEAR)).withMonthOfYear(c.get(Calendar.MONTH) + 1).withDayOfMonth(c.get(Calendar.DAY_OF_MONTH))
                .withMillisOfDay(0);
    }
316272
private CellFormatResult getCellValue(final Cell cell, final Locale locale, final boolean isStartDate1904) {
        
        final JXLCell jxlCell = new JXLCell(cell, isStartDate1904);
        final short formatIndex = jxlCell.getFormatIndex();
        final String formatPattern = jxlCell.getFormatPattern();
        
        if(formatterResolver.canResolve(formatIndex)) {
            final CellFormatter cellFormatter = formatterResolver.getFormatter(formatIndex);
            return cellFormatter.format(jxlCell, locale);
            
        } else if(formatterResolver.canResolve(formatPattern)) {
            final CellFormatter cellFormatter = formatterResolver.getFormatter(formatPattern);
            return cellFormatter.format(jxlCell, locale);
            
        } else {
            // キャッシュに登録する。
            final CellFormatter cellFormatter = formatterResolver.createFormatter(formatPattern) ;
            if(isCache()) {
                formatterResolver.registerFormatter(formatPattern, cellFormatter);
            }
            return cellFormatter.format(jxlCell, locale);
            
        }
        
    }
1330360
public synchronized Date setStartDate(Date time)
    {
        m_cachedInfo.setStartDate(time);
        int iThisIndex = m_model.indexOf(this);
        if (iThisIndex != -1)
            m_model.fireTableRowsUpdated(iThisIndex, iThisIndex);
        this.changeRemoteDate(null, null, this, time, null);
        return this.getStartDate();
    }
819299
public void setDate(com.google.api.ads.admanager.axis.v201805.Date date) {
        this.date = date;
    }
173271
@SuppressWarnings("squid:S2259") // Null pointers should not be dereferenced
  void setCellValue(Cell cell, Object value) {
    if (value instanceof Boolean) {
      cell.setCellValue(toBoolean(value));
    } else if (value instanceof LocalDate) {
      Instant instant = toLocalDate(value).atStartOfDay(timeZone.toZoneId()).toInstant();
      cell.setCellValue(simpleDateFormat.format(Date.from(instant)));
    } else if (value instanceof Instant) {
      cell.setCellValue(simpleDateTimeFormat.format(Date.from((Instant) value)));
    } else if (value instanceof Double) {
      cell.setCellValue(toDouble(value));
    } else if (value instanceof Integer) {
      cell.setCellValue(toInt(value));
    } else if (value instanceof Long) {
      cell.setCellValue(toLong(value));
    } else if (value instanceof String) {
      cell.setCellValue(value.toString());
    } else {
      throw new UnsupportedValueException(value);
    }
  }
269152
public static Date getFirstDateOfMonth(Date date) {

        if (date == null)
            return null;

        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH));

        return calendar.getTime();
    }