Translates a custom date format string using tokens like
yyyy, mm, dd, mmm, etc. into a valid
strftime-compatible format string (C-style).
Details
The function parses the input string sequentially and replaces
recognized tokens while leaving all other characters unchanged.
This makes it robust to compact formats (e.g. yyyymmdd)
and mixed text.
Supported tokens:
d,dd,ddd,ddddm,mm,mmm,mmmmy,yy,yyyy
Mapping:
yyyy->\%Yyy,y->\%ymm,m->\%mmmm->\%bmmmm->\%Bdd->\%dd->\%eddd->\%adddd->\%A
