Would allow to overcome the currently fixed set for odd formats like
Great initiative for doing this package. Important feature in format strings context: some languages/localization (e.g., Hebrew) specify date in %d/%m/%Y instead of the worldwide standard (%m/%d/%Y). When inputting a vector such as:
You get an NA for the first value and an opposite day-month for the second value, though you can probably deduce the meaning from some values (in the example the first value) and apply it on "localization-ambiguous" values (in the example, the second).
Probably a unique situation (according to localization), so should be applied using a parameter.
Same with many European formats which do, say, %d.%m.%Y.
But this (famously) clashes with what North America does in its (braindead, but prevalent) %m/%d/%Y -- modulo the separators. There is no way to deal with the safely -- hence everybody's preference for ISO formats -- and strptime() et al have the same issue. I am not sure localization can help.
You can pre-load formats in the next version:
R> anytime:::addFormat("%d.%m.%Y") # Europe
 "2012-11-10 CST"
If you can work out how localization could help at the C++ level offered by Boost I'd be interested. Otherwise it is the "same old" issue also plagueing strptime() et al, and there is little I can do.
Good news: Boost has %x for locale-dependent input, see the docs.
I plan to test that.
Format strings can now be added.