Fixed. I used strftime itself to check if %e is supported. I added a bit of caching so the impact on perfomances should be negligible.