NXP-11808: make formatDate method public to pass date pattern as an argument