@@ -0,0 +1,1180 @@
+package lp.web.utils;%0A%0Aimport java.text.SimpleDateFormat;%0Aimport java.time.LocalDate;%0Aimport java.time.temporal.TemporalField;%0Aimport java.time.temporal.WeekFields;%0Aimport java.util.Date;%0Aimport java.util.Locale;%0A%0A/**%0A * This class exposes utils to handle date operations%0A *%0A * @author lucapompei%0A */%0Apublic class DateUtils %7B%0A%0A%09/**%0A%09 * The date formatter%0A%09 */%0A%09private static final String DATE_FORMATTER_PATTERN = %22dd-MM-yyyy%22;%0A%0A%09/**%0A%09 * Private constructor for an utility class, construct a new %7B@code DateUtils%7D%0A%09 */%0A%09private DateUtils() %7B%0A%09%09// Empty implementation%0A%09%7D%0A%0A%09/**%0A%09 * Calculates and returns the current week%0A%09 * %0A%09 * @return the current week%0A%09 */%0A%09public static String getCurrentWeek() %7B%0A%09%09LocalDate date = LocalDate.now();%0A%09%09TemporalField woy = WeekFields.of(Locale.getDefault()).weekOfWeekBasedYear();%0A%09%09return %22W%22 + date.get(woy);%0A%09%7D%0A%0A%09/**%0A%09 * Returns a formatted and more readable date%0A%09 * %0A%09 * @param date,%0A%09 *            the date to format%0A%09 * %0A%09 * @return a formatted date%0A%09 */%0A%09public static String getFormattedDate(Date date) %7B%0A%09%09SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_FORMATTER_PATTERN);%0A%09%09return simpleDateFormat.format(date);%0A%09%7D%0A%0A%7D%0A

Add utility class