Transforms JS date object to string according to date format.
external static String formatDate(DateTime dateObj, String dateFormat);