As in title, I just want set a custom format for macro ___DATE___ : is it possibile?
Default format is mm/dd/yy, but I would like to have yyyy-mm-dd
Also, I can't find official documentation for all available macros.
Thanks
The format for the ___DATE___ parameter can be set in Settings.app.
Settings.app -> General -> Language & Region -> Date format
Then set the Short format to be how you want it to appear.
The __DATE__ macro is part of the C++ standard, and the format is specified precisely by that standard (as Mmm dd yyyy, not mm/dd/yy). That is what I'd expect XCode to produce for an Objective-C program; I know nothing about Swift.
You can find a list of macros defined by GCC in the Gnu CPP documentation. I believe Clang (used by default by XCode) implements the same ones.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With