@Override public void setAsText(String text) { if (StringUtils.isNullOrEmpty(text)) { setValue(null); } else { setValue(DATE_TIME_FORMATTER.parseLocalDateTime(text)); } }
public static String weekDayOfBirthday(String birthday, String year) { // напишите тут ваш код DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("dd.MM.yyyy"); LocalDateTime localDateTime = dateTimeFormatter.parseLocalDateTime(birthday); localDateTime = localDateTime.withYear(Integer.valueOf(year)); return DateTimeFormat.forStyle("FF") .withLocale(Locale.ITALY) .print(localDateTime) .split(" ")[0]; }
public void setBirthdayAsFormattedString(String date) { DateTimeFormatter formatter = DateTimeFormat.forPattern(AppConstants.DateFormat.DF_yyyyMMdd_minus); this.birthday = formatter.parseLocalDateTime(date); }