Java Regex Date Vaidate dateTimePattern()

Here you can find the source of dateTimePattern()

Description

date Time Pattern

License

Apache License

Declaration

public static Pattern dateTimePattern() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.regex.Pattern;

public class Main {
    private final static Pattern dateTimePattern = Pattern
            .compile("-?\\d{4,}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}([.]\\d{1,})?(Z|[+-]?\\d{2}:\\d{2})?");

    public static Pattern dateTimePattern() {
        return dateTimePattern;
    }/*from w  w  w . j  av  a2  s . co  m*/
}

Related

  1. checkDateYYYYMMMDD(String date)
  2. dateMatcher(String dt)
  3. dateOfAny(final String value)
  4. datePatternPattern(String appenderPrefix)
  5. dateTimeMatcher(String dt)
  6. dateToString(Date date)
  7. parseDate(final String date, final DateTimeFormatter parser)
  8. parseDate(String date)
  9. parseDate(String dateStr)