Android Date Time Format Pattern -
i want know if there way format being used system. of using joda time library , manually specifying foramt expect date in.
private final datetimeformatter formatter = datetimeformat.forpattern("yyyy-mm-dd"); localdate date = localdate.parse(event_date, formatter);
this of course not best idea hardcode pattern,so there way can pattern system?
you can use this:
dateformat formatter = dateformat.getdateinstance(dateformat.short, locale.getdefault()); string pattern = ((simpledateformat)formatter).topattern(); string localpattern = ((simpledateformat)formatter).tolocalizedpattern();
Comments
Post a Comment