patterns-group / code-patterns

Code Patterns: lots of reusable goodies for your .NET project
tribesoftware.org/code-patterns/
BSD 2-Clause "Simplified" License
9 stars 9 forks source link

Add DateTime parser #134

Open jbatte47 opened 11 years ago

jbatte47 commented 11 years ago

Approaches to investigate:

  1. Static list of formats to accept in DateTime.TryParseExact -- could come from config (or anywhere)
  2. Regex parser
  3. Regex-driven format selector
chrislwade commented 11 years ago

What is the method being added and do you some example use cases? I ask because there's already a DateTime.TryParseExact, although it only supports format strings.

jbatte47 commented 11 years ago

I was actually thinking of a new interface / class: IDateTimeParser / DateTimeParser. Not sure about the method name. That'll probably just be parse, but I'm open to suggestions.