I want something like content of __DATE__ compiled into my binary.
(Being the date of compilation that is important.) However, I'd like the
compiled-in string to be in the ISO standard format (YYYY-MM-DD) instead
of the default "US" format (Mmm DD YYYY).
Does anyone know a simple, reasonable portable and standard way to
achieve this kind of string being produced at compile-time?
Example:
// I could have:
const char* build_date = __DATE__; // gives "Feb 18 2005" for example
//
// I want:
const char* iso_date = "2005-02-18"; // have to change manually :-(
Any ideas?
-+-Ben-+-