(bluefox) optimize formatDate