public String format() {
		final StringBuilder sb = new StringBuilder();
		if (betweenMs > 0) {
			long day = betweenMs / DateUnit.DAY.getMillis();
			long hour = betweenMs / DateUnit.HOUR.getMillis() - day * 24;
			long minute = betweenMs / DateUnit.MINUTE.getMillis() - day * 24 * 60 - hour * 60;

			final long BetweenOfSecond = ((day * 24 + hour) * 60 + minute) * 60;
			long second = betweenMs / DateUnit.SECOND.getMillis() - BetweenOfSecond;
			long millisecond = betweenMs - (BetweenOfSecond + second) * 1000;

			final int level = this.level.ordinal();
			int levelCount = 0;

			if (isLevelCountValid(levelCount) && day > 0) {
				sb.append(day).append(levelFormatter.apply(Level.DAY)).append(separator);
				levelCount++;
			}
			if (isLevelCountValid(levelCount) && 0 != hour && level >= Level.HOUR.ordinal()) {
				sb.append(hour).append(levelFormatter.apply(Level.HOUR)).append(separator);
				levelCount++;
			}
			if (isLevelCountValid(levelCount) && 0 != minute && level >= Level.MINUTE.ordinal()) {
				sb.append(minute).append(levelFormatter.apply(Level.MINUTE)).append(separator);
				levelCount++;
			}
			if (isLevelCountValid(levelCount) && 0 != second && level >= Level.SECOND.ordinal()) {
				sb.append(second).append(levelFormatter.apply(Level.SECOND)).append(separator);
				levelCount++;
			}
			if (isLevelCountValid(levelCount) && 0 != millisecond && level >= Level.MILLISECOND.ordinal()) {
				sb.append(millisecond).append(levelFormatter.apply(Level.MILLISECOND)).append(separator);
				// levelCount++;
			}
		}

		if (StrUtil.isEmpty(sb)) {
			sb.append(0).append(levelFormatter.apply(this.level));
		} else {
			if (StrUtil.isNotEmpty(separator)) {
				sb.delete(sb.length() - separator.length(), sb.length());
			}
		}
		return sb.toString();
	}
@Test
	public void formatTest() {
		long betweenMs = DateUtil.betweenMs(DateUtil.parse("2017-01-01 22:59:59"), DateUtil.parse("2017-01-02 23:59:58"));
		BetweenFormatter formater = new BetweenFormatter(betweenMs, Level.MILLISECOND, 1);
		assertEquals(formater.toString(), "1天");
	}