In the Boost date time library, is there a utility function for converting month short strings (e.g. Jan, Feb, Mar, Apr) to boost::gregorian::greg_month type? The documentation for the library isn’t great and I can’t see anything in the headers.
Share
A hacky work around could be:
This map contains mapping between all the short/long names and the short necessary to create a
greg_monthinstance. Just need to create a little wrapper around it…per Graeme’s discovery, there is a convenience function which wraps this already
boost::date_time::month_str_to_ushort<>