I'd like to overwrite normalizeDateValue() in my derived Formatter class to format invalid date/time expressions as empty string instead of 1970-01-01...
To do so normalizeDateValue() should be defined as protected, not private.
I will provide a pull request.
#1977: declared CFormatter::normalizeDateValue() as protected
You can not return a string in normalizeDateValue() this will cause the date() function in format methods to fail.
You have to overwrite format methods instead.
Still making it protected might be a good change, let me think about it a short while.
Of course you're right. I realized that only after posting. Still what I've ended up doing is letting normalizeDateValue() return null for invalid date/time expressions and react to that in format methods. My idea is that any modification of a date/time expression should occur in normalizeDateValue() and not in any of the format methods.