If separator can be anything then something like:
=========================== import re
...
if not (LDFMT.count('%Y') == 1 and LDFMT.count('%m') == 1 and LDFMT.count('%d') == 1): LDFMT = '%Y/%m/%d'
===========================
will do...
If separator can be anything then something like:
======= ======= ======= ======
import re
...
if not (LDFMT.count('%Y') == 1 and LDFMT.count('%m') == 1 and LDFMT.count('%d') == 1):
LDFMT = '%Y/%m/%d'
======= ======= ======= ======
will do...