I am implementing a Fuzzy Date control in C# for a winforms application. The Fuzzy Date should be able to take fuzzy values like
- Last June
- 2 Hours ago
- 2 Months ago
- Last week
- Yesterday
- Last year
and the like
Are there any sample implementations of “Fuzzy” Date Time Pickers?
Any ideas to implement such a control would be appreciated
PS:
I am aware of the fuzzy date algorithm spoken about here and here, I am really looking for any ideas and inspirations for developing such a control
The parsing is quite easy. It can be implemented as bunch of regexps and some date calculations.
The sample below can be easily extended to suit your needs.
I’ve roughly tested it and it works at least for the following strings:
The helper class:
Usage example: