Bugfix on date formatting