aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2012-08-28 07:52:28 +0200
committerChristian Halstrick <christian.halstrick@sap.com>2012-08-28 19:33:42 +1000
commitabd60101b646bfa170e7a4066fd64c32571e4a15 (patch)
treef77b42f44368fc294596d9b332b21eb8f9f72dc4 /org.eclipse.jgit.junit
parent47e4e9b177ac536356ad620e976671d24e4939ba (diff)
downloadjgit-abd60101b646bfa170e7a4066fd64c32571e4a15.tar.gz
jgit-abd60101b646bfa170e7a4066fd64c32571e4a15.zip
Implement a parser for dates
In order to parse user specified strings containing date and time info a thread-safe parser is implemented. This is needed for example to interpret configuration parameters (e.g. gc.pruneexpire where need to parse strings like "2 weeks ago"). The parser is thread-safe by caching SimpleDateFormat instances in a ThreadLocal cache. Native git has a parser called approxidate which is able to interpret a huge number of formats ("1 year ago", "tea time", ...). Ideally JGit should be able to parse the same strings as native git but for now this parser understands the following subset: "now" "yesterday" "(x) years|months|weeks|days|hours|minutes|seconds ago" "yyyy-MM-dd HH:mm:ss Z" (ISO) "EEE, dd MMM yyyy HH:mm:ss Z" (RFC) "yyyy-MM-dd" "yyyy.MM.dd" "MM/dd/yyyy" "dd.MM.yyyy" "EEE MMM dd HH:mm:ss yyyy Z" (DEFAULT) "EEE MMM dd HH:mm:ss yyyy" (LOCAL) Change-Id: Iccb66dadb60da13104e73140e53d5e2de068369c
Diffstat (limited to 'org.eclipse.jgit.junit')
0 files changed, 0 insertions, 0 deletions