This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SimpleDateFormat calendarFormatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH); | |
Calendar now = Calendar.getInstance(); | |
String strFromCal = calendarFormatter.format(now); | |
Calendar calFromStr = Calendar.getInstance(); | |
try { | |
calFromStr.setTime(calendarFormatter.parse(strFromCal)); | |
} catch (ParseException e) { | |
e.printStackTrace(); | |
} |
NewerOlder