I want to know if there is a way to get the format that is currently being used by the system. As of now i am using the Joda Time library and manually specifying the foramt that i expect the date to be in.
private final DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd");
LocalDate date = LocalDate.parse(event_date, formatter);
This is of course not the best idea to hardcode the pattern,so is there a way i can get the pattern from the system?
Aucun commentaire:
Enregistrer un commentaire