日時の書式かどうか判定する。
@param store
@return
191561
public boolean isDatePattern(final TokenStore store) {
        
        if(store.containsInFactor("General")) {
            return false;
        }
        
        if(store.containsAnyInFactorIgnoreCase(DATE_DECISTION_CHARS)) {
            return true;
        }
        
        // [h][m][s]の形式のチェック
        for(Token token : store.getTokens()) {
            if(!(token instanceof Token.Condition)) {
                continue;
            }
            
            final Token.Condition condition = token.asCondition();
            final String value = condition.getValue();
            if(PATTERN_ELAPSED_TIME.matcher(value).matches()) {
                return true;
            }
            
        }
        
        return false;
    }
271892
static BitStore newRangedView(BitStore store, int from, int to) {
		if (store == null) throw new IllegalArgumentException("null store");
		if (from < 0) throw new IllegalArgumentException();
		if (from > to) throw new IllegalArgumentException();
		if (to > store.size()) throw new IllegalArgumentException();
		return new AbstractBitStore() {

			@Override
			public int size() {
				return to - from;
			}

			@Override
			public boolean getBit(int index) {
				return store.getBit(adjIndex(index));
			}

			@Override
			public void setBit(int index, boolean value) {
				store.setBit(adjIndex(index), value);
			}

			@Override
			public void flipBit(int index) {
				store.flipBit(adjIndex(index));
			}

			@Override
			public long getBits(int position, int length) {
				return store.getBits(adjPosition(position), length);
			}

			@Override
			public int getBitsAsInt(int position, int length) {
				return store.getBitsAsInt(adjPosition(position), length);
			}

			@Override
			public boolean getThenSetBit(int index, boolean value) {
				return store.getThenSetBit(adjIndex(index), value);
			}

			@Override
			public void setStore(int position, BitStore that) {
				store.setStore(adjPosition(position), that);
			}

			@Override
			public BitWriter openWriter() {
				return Bits.newBitWriter(store, from, to);
			}

			@Override
			public BitWriter openWriter(int finalPos, int initialPos) {
				return store.openWriter(adjPosition(finalPos), adjPosition(initialPos));
			}

			@Override
			public BitReader openReader() {
				return store.openReader(from, to);
			}

			@Override
			public BitReader openReader(int finalPos, int initialPos) {
				return store.openReader(adjPosition(finalPos), adjPosition(initialPos));
			}

			@Override
			public boolean isMutable() {
				return store.isMutable();
			}

			private int adjIndex(int index) {
				if (index < 0) throw new IllegalArgumentException("negative index");
				index += from;
				if (index >= to) throw new IllegalArgumentException("index too large");
				return index;
			}

			private int adjPosition(int position) {
				if (position < 0) throw new IllegalArgumentException("negative position");
				position += from;
				if (position > to) throw new IllegalArgumentException("position too large");
				return position;
			}
		};
	}
1319732
public static DayOfWeek dayOfWeek(DateValue date) {
		int dayIndex = fixedFromGregorian(date.year(), date.month(), date.day()) % 7;
		if (dayIndex < 0) {
			dayIndex += 7;
		}
		return DAYS_OF_WEEK[dayIndex];
	}
647263
private static String formatDate(Object dateObj, String format) {
		if (StrUtil.isNotBlank(format)) {
			final Date date = (dateObj instanceof Date) ? (Date)dateObj : ((Calendar)dateObj).getTime();
			//用户定义了日期格式
			return DateUtil.format(date, format);
		}
		
		//默认使用时间戳
		return String.valueOf((dateObj instanceof Date) ? ((Date)dateObj).getTime() : ((Calendar)dateObj).getTimeInMillis());
	}
127367
function(date, h) {
        var copiedDate = new Date(date.getTime());
        copiedDate.setHours(copiedDate.getHours()+h);
        return copiedDate;
    }
175494
public static Date getDayDate(Date date) {
		Calendar calendar = getCalendar();
		calendar.setTime(date);
		return getDayDate(calendar);
	}
875157
@Override
    public RowIterator firstRow(Session session, PersistentStore store) {

        int tempDepth = 0;

        readLock.lock();

        try {
            NodeAVL x = getAccessor(store);
            NodeAVL l = x;

            while (l != null) {
                x = l;
                l = x.getLeft(store);

                tempDepth++;
            }

            while (session != null && x != null) {
                Row row = x.getRow(store);

                if (session.database.txManager.canRead(session, row)) {
                    break;
                }

                x = next(store, x);
            }

            return getIterator(session, store, x);
        } finally {
            depth = tempDepth;

            readLock.unlock();
        }
    }
53810
public boolean contains(final AbstractDynamoDbStore store, final StaticBuffer key, final StaticBuffer column) {
        return expectedValues.containsKey(store)
            && expectedValues.get(store).containsKey(key)
            && expectedValues.get(store).get(key).containsKey(column);
    }
939696
public static int getDayAsReadableInt(long time) {
        Calendar cal = calendarThreadLocal.get();
        cal.setTimeInMillis(time);
        return getDayAsReadableInt(cal);
    }
648913
@Benchmark
	@BenchmarkMode(Mode.Throughput)
	public String formatDate() {
		synchronized (SIMPLE_DATE_FORMAT) {
			return SIMPLE_DATE_FORMAT.format(DATE);
		}
	}
635335
private static Calendar getCalendar(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar;
    }
464393
@Override
    public Date getDate(@NonNull String key) {
        if (key == null) { throw new IllegalArgumentException("key cannot be null."); }

        final int index = indexForColumnName(key);
        return index >= 0 ? getDate(index) : null;
    }
451558
public static List<Date> toDateList(final List<Calendar> dates) {
        return dates.stream().map(Calendar::getTime).collect(Collectors.toList());
    }
1165506
private String getStringForDay(int day) {
        if(fDates == null) {
            loadDates();
        }
        for(URelativeString dayItem : fDates) {
            if(dayItem.offset == day) {
                return dayItem.string;
            }
        }
        return null;
    }
1115538
public PersistentStore getRowStore(TableBase table) {

        if (table.store != null) {
            return table.store;
        }

        if (table.isSessionBased) {
            return persistentStoreCollection.getStore(table);
        }

        return database.persistentStoreCollection.getStore(table);
    }
1049076
public static @Nullable Date get(@Nullable Page page) {
    if (page == null) {
      return null;
    }
    Calendar lastModified = page.getLastModified();
    if (lastModified != null) {
      return lastModified.getTime();
    }
    else {
      return null;
    }
  }
783458
public int getRemainingDays(String startDate, String endDate, Date currentDate) throws java.text.ParseException {
		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");

		Calendar iterationEndDate = Calendar.getInstance();
		iterationEndDate.setTime(dateFormat.parse(endDate));

		Calendar iterationStartDate = Calendar.getInstance();
		iterationStartDate.setTime(dateFormat.parse(startDate));

		Calendar currentCalendarDate = Calendar.getInstance();
		currentCalendarDate.setTime(currentDate);

		int remainingDays = 0;

		if ((iterationStartDate.compareTo(currentCalendarDate) == 1)
				|| (iterationEndDate.compareTo(currentCalendarDate) == -1)) {

			return remainingDays;
		}

		while (iterationEndDate.compareTo(currentCalendarDate) == 1) {
			if ((currentCalendarDate.get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY)
					&& (currentCalendarDate.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY)) {
				++remainingDays;
			}
			currentCalendarDate.add(Calendar.DAY_OF_MONTH, 1);
		}

		return remainingDays;
	}