com.yuehuanghun.mybatis.milu.tool.converter.impl.DateUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mybatis-milu Show documentation
Show all versions of mybatis-milu Show documentation
A mybatis orm enhance framework.
package com.yuehuanghun.mybatis.milu.tool.converter.impl;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.OffsetDateTime;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;
import java.time.temporal.TemporalQueries;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Pattern;
import com.yuehuanghun.mybatis.milu.exception.SqlExpressionBuildingException;
class DateUtil {
static final Pattern P1_REGEX = Pattern.compile("^\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2}$");
static final String P1 = "yyyy-MM-dd HH:mm:ss";
static final Pattern P2_REGEX = Pattern.compile("^\\d{4}-\\d{2}-\\d{2}$");
static final String P2 = "yyyy-MM-dd";
static final Pattern P3_REGEX = Pattern.compile("\\d{4}/\\d{2}/\\d{2}\\s\\d{2}:\\d{2}:\\d{2}$");
static final String P3 = "yyyy/MM/dd HH:mm:ss";
static final Pattern P4_REGEX = Pattern.compile("^\\d{4}-\\d{2}-\\d{2}$");
static final String P4 = "yyyy/MM/dd";
static final Pattern P5_REGEX = Pattern.compile("^\\d{8}$");
static final String P5 = "yyyyMMdd";
static final Pattern P6_REGEX = Pattern.compile("^\\d{14}$");
static final String P6 = "yyyyMMddHHmmss";
static final Pattern P7_REGEX = Pattern.compile("^\\d{17}$");
static final String P7 = "yyyyMMddHHmmssSSS";
static final Pattern P8_REGEX = Pattern.compile("^\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2}\\.\\d{3}$");
static final String P8 = "yyyy-MM-dd HH:mm:ss.SSS";
static final Pattern P9_REGEX = Pattern.compile("^\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2},\\d{3}$");
static final String P9 = "yyyy-MM-dd HH:mm:ss,SSS";
static final Pattern P10_REGEX = Pattern.compile("^\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}$");
static final String P10 = "yyyy-MM-dd HH:mm";
//时间
static final Pattern _P1_REGEX = Pattern.compile("^\\d{2}:\\d{2}:\\d{2}$");
static final String _P1 = "HH:mm:ss";
static final Pattern _P2_REGEX = Pattern.compile("^\\d{6}$");
static final String _P2 = "HHmmss";
static final Map PATTERN_FORMAT_MAP = new LinkedHashMap<>();
static final ThreadLocal
© 2015 - 2024 Weber Informatics LLC | Privacy Policy