Extended and fixed timemark code.
This commit is contained in:
parent
1da2b34734
commit
68bfab5b26
1 changed files with 38 additions and 38 deletions
|
@ -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);
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue