19 package org.sleuthkit.autopsy.coreutils;
21 import java.text.SimpleDateFormat;
22 import java.util.Calendar;
23 import java.util.regex.Matcher;
24 import java.util.regex.Pattern;
35 private static final Pattern
TIME_STAMP_PATTERN = Pattern.compile(
"\\d{4}_\\d{2}_\\d{2}_\\d{2}_\\d{2}_\\d{2}$");
37 private static final SimpleDateFormat
DATE_FORMAT =
new SimpleDateFormat(
"yyyy_MM_dd_HH_mm_ss");
47 Matcher m = TIME_STAMP_PATTERN.matcher(inputString);
66 return DATE_FORMAT.format(Calendar.getInstance().getTime());
77 String trimmedString = inputString;
92 String timeStamp =
"";
94 timeStamp = inputString.substring(inputString.length() -
getTimeStampLength(), inputString.length());
static String getTimeStampOnly(String inputString)
static final SimpleDateFormat DATE_FORMAT
static String removeTimeStamp(String inputString)
static boolean endsWithTimeStamp(String inputString)
static String createTimeStamp()
static final Pattern TIME_STAMP_PATTERN
static int getTimeStampLength()
static final int LENGTH_OF_DATE_TIME_STAMP