org.joda.time.format.DateTimeFormat help

Paul B. Henson henson at cpp.edu
Thu Jun 8 20:43:17 EDT 2017


On Thu, Jun 08, 2017 at 09:38:55PM +0000, Cantor, Scott wrote:

> > c:_0="M dd yyyy HH:mm:ss"
> 
> Maybe try MMM?

Ah, yes; that worked, I guess I hadn't tried that one yet. I'm just not
making a good showing on this expired password config stuff <sigh>.

The documentation was a bit confusing, it said "if the number of pattern
letters is 4 or more, the full form is used; otherwise a short or
abbreviated form is used if available". At first I thought I just needed
one char to match each category, then I saw in the example config there
were multiple, but I guess I didn't remember to try bumping the month
field. Hmm, now I see there's a separate caveat about the month match "3
or over, use text, otherwise use number".

Seems a bit user unfriendly. Would you ever use just one M in a match?
Only if you were restricting your dates to January through September in
numeric non-zero filled form 8-/?

Ah well, thanks for the tip.

-- 
Paul B. Henson  |  (909) 979-6361  |  http://www.cpp.edu/~henson/
Operating Systems and Network Analyst  |  henson at cpp.edu
California State Polytechnic University  |  Pomona CA 91768


More information about the users mailing list