diff --git a/src/fr/devinsy/statoolinfos/metrics/TimeMark.java b/src/fr/devinsy/statoolinfos/metrics/TimeMark.java index aac9f9c..54a100c 100644 --- a/src/fr/devinsy/statoolinfos/metrics/TimeMark.java +++ b/src/fr/devinsy/statoolinfos/metrics/TimeMark.java @@ -223,42 +223,6 @@ public class TimeMark return result; } - /** - * Month of. - * - * @param date - * the date - * @return the time mark - */ - public static TimeMark monthOf(final LocalDate date) - { - TimeMark result; - - String month = date.format(DateTimeFormatter.ofPattern("yyyy-MM", Locale.FRANCE)); - result = new TimeMark(month); - - // - return result; - } - - /** - * Month of. - * - * @param date - * the date - * @return the time mark - */ - public static TimeMark monthOf(final LocalDateTime date) - { - TimeMark result; - - String month = date.format(DateTimeFormatter.ofPattern("yyyy-MM", Locale.FRANCE)); - result = new TimeMark(month); - - // - return result; - } - /** * Month of. * @@ -277,6 +241,42 @@ public class TimeMark return result; } + /** + * Month of. + * + * @param date + * the date + * @return the time mark + */ + public static TimeMark yearMonthOf(final LocalDate date) + { + TimeMark result; + + String month = date.format(DateTimeFormatter.ofPattern("yyyy-MM", Locale.FRANCE)); + result = new TimeMark(month); + + // + return result; + } + + /** + * Month of. + * + * @param date + * the date + * @return the time mark + */ + public static TimeMark yearMonthOf(final LocalDateTime date) + { + TimeMark result; + + String month = date.format(DateTimeFormatter.ofPattern("yyyy-MM", Locale.FRANCE)); + result = new TimeMark(month); + + // + return result; + } + /** * Year of. * @@ -324,7 +324,7 @@ public class TimeMark { TimeMark result; - String yearWeek = date.format(DateTimeFormatter.ofPattern("yyyyWW", Locale.FRANCE)); + String yearWeek = date.format(DateTimeFormatter.ofPattern("yyyy-'W'ww", Locale.FRANCE)); result = new TimeMark(yearWeek); // @@ -342,7 +342,7 @@ public class TimeMark { TimeMark result; - String yearWeek = date.format(DateTimeFormatter.ofPattern("yyyyWW", Locale.FRANCE)); + String yearWeek = date.format(DateTimeFormatter.ofPattern("yyyyww", Locale.FRANCE)); result = new TimeMark(yearWeek); //