java.util.Date .
When git needs to parse strings specified by the user this parser can be
used. One example is the parsing of the config parameter gc.pruneexpire. The
parser can handle only subset of what native gits approxidate parser
understands.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum |
| Modifier and Type | Field and Description |
|---|---|
| private static ThreadLocal | |
| public static final Date | NEVER
The Date representing never. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static SimpleDateFormat | |
| private static SimpleDateFormat | |
| public static Date | Returns: the parsedjava.the string to be parsed dateStr, Calendar the base date which is used for the calculation of relative
formats. E.g. if baseDate is "25.8.2012" then parsing of the
string "1 week ago" would result in a date corresponding to
"18.8.2012". This is used when a JGit command calls this
parser often but wants a consistent starting point for
calls. now)If set to null then the current time will be used
instead.Parses a string into a |
| public static Date | Returns: the parsedjava.the string to be parsed dateStr, Calendar the base date which is used for the calculation of relative
formats. E.g. if baseDate is "25.8.2012" then parsing of the
string "1 week ago" would result in a date corresponding to
"18.8.2012". This is used when a JGit command calls this
parser often but wants a consistent starting point for
calls. now, Locale If set to null then the current time will be used
instead.locale to be used to parse the date string locale)Parses a string into a |
| private static Date | |
| private static Date |
| formatCache | back to summary |
|---|---|
| private static ThreadLocal<Map<Locale, Map<GitDateParser. | |
| NEVER | back to summary |
|---|---|
| public static final Date NEVER The Date representing never. Though this is a concrete value, most callers are adviced to avoid depending on the actual value. | |
| GitDateParser | back to summary |
|---|---|
| public GitDateParser() | |
| getDateFormat | back to summary |
|---|---|
| private static SimpleDateFormat getDateFormat(GitDateParser. | |
| getNewSimpleDateFormat | back to summary |
|---|---|
| private static SimpleDateFormat getNewSimpleDateFormat(GitDateParser. | |
| parse | back to summary |
|---|---|
| public static Date parse(String dateStr, Calendar now) throws ParseException Parses a string into a
| |
| parse | back to summary |
|---|---|
| public static Date parse(String dateStr, Calendar now, Locale locale) throws ParseException Parses a string into a
| |
| parse_relative | back to summary |
|---|---|
private static Date parse_relative(String dateStr, Calendar now)
| |
| parse_simple | back to summary |
|---|---|
| private static Date parse_simple(String dateStr, GitDateParser. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final GitDateParser. | |
| private final String | |
| public static final GitDateParser. | |
| public static final GitDateParser. | |
| public static final GitDateParser. | |
| public static final GitDateParser. | |
| public static final GitDateParser. | |
| public static final GitDateParser. | |
| public static final GitDateParser. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static GitDateParser. | |
| public static GitDateParser. |
| DEFAULT | back to summary |
|---|---|
| public static final GitDateParser. | |
| formatStr | back to summary |
|---|---|
| private final String formatStr | |
| ISO | back to summary |
|---|---|
| public static final GitDateParser. | |
| LOCAL | back to summary |
|---|---|
| public static final GitDateParser. | |
| RFC | back to summary |
|---|---|
| public static final GitDateParser. | |
| SHORT | back to summary |
|---|---|
| public static final GitDateParser. | |
| SHORT_WITH_DOTS | back to summary |
|---|---|
| public static final GitDateParser. | |
| SHORT_WITH_DOTS_REVERSE | back to summary |
|---|---|
| public static final GitDateParser. | |
| SHORT_WITH_SLASH | back to summary |
|---|---|
| public static final GitDateParser. | |
| ParseableSimpleDateFormat | back to summary |
|---|---|
| private ParseableSimpleDateFormat(String formatStr) | |
| valueOf | back to summary |
|---|---|
| public static GitDateParser. | |
| values | back to summary |
|---|---|
| public static GitDateParser. | |