title: Parse a date from a CharSequence with standard patterns…
body: <p>I'm writing a parser for a command line interface of an external tool and I'm using Scala's parser combinators library. As part of this I need to parse a standard date of the format <strong>EEE MMM d HH:mm:ss yyyy Z</strong>.</p>
  
  <p>Scala's parser-combinators are "stream-based" and works with CharSequence's instead of Strings. That makes it hard for me to use either <strong>java.text.DateTimeFormat</strong> or <strong>DateTimeFormat</strong> from JodaTime since they both work with Strings.</p>
  
  <p>As of now, I hade to write my own regex-parser like this to parse the date, but I would much rather incorporate the work that has been done with JodaTime into my parser. I really don't want to reinvent the wheel. I've been looking at the source-code of JodaTime and I'm not really sure why it needs to work with Strings instead of just CharSequences. Am I missing some aspect?</p>