public class ReportUtils extends Object
Constructor and Description |
---|
ReportUtils() |
Modifier and Type | Method and Description |
---|---|
String |
formatDuration(long duration)
Format duration in 00:00:00 format.
|
List<Date> |
getDailyDates(Date begin,
Date end)
Get date list, between to date (1 day interval).
|
Map<Date,String> |
getDailyTaskAnnotation(TimerTask task,
Date day)
Get task annotations for a day.
|
long |
getDailyTaskTime(TimerTask task,
Date day)
Get task proper time for a day.
|
long |
getDailyTotalTaskTime(TimerTask task,
Date day)
Get task total time (including subtask) for a day.
|
List<Date> |
getMonthlyDates(Date begin,
Date end)
Get date list, between to date (1 month interval).
|
Map<Date,String> |
getMonthlyTaskAnnotation(TimerTask task,
Date month,
Date fromDay,
Date toDay)
Get task annotations for a month.
|
long |
getMonthlyTaskTime(TimerTask task,
Date month,
Date fromDay,
Date toDay)
Get task proper time for a month.
|
long |
getMonthlyTotalTaskTime(TimerTask task,
Date month,
Date fromDay,
Date toDay)
Get task total time (including subtask) for a month.
|
protected List<Date> |
getPeriodDates(Date begin,
Date end,
int calendarField)
Get date list, between to date.
|
List<TimerTask> |
getSubTaskOrdered(TimerTask task)
Return task subtasks ordered by name.
|
List<Date> |
getWeeklyDates(Date begin,
Date end)
Get date list, between to date (1 week interval).
|
Map<Date,String> |
getWeeklyTaskAnnotation(TimerTask task,
Date week,
Date fromDay,
Date toDay)
Get task annotations for a week.
|
long |
getWeeklyTaskTime(TimerTask task,
Date week,
Date fromDay,
Date toDay)
Get task proper time for a week.
|
long |
getWeeklyTotalTaskTime(TimerTask task,
Date week,
Date fromDay,
Date toDay)
Get task total time (including subtask) for a week.
|
List<Date> |
getYearlyDates(Date begin,
Date end)
Get date list, between to date (1 year interval).
|
Map<Date,String> |
getYearlyTaskAnnotation(TimerTask task,
Date year,
Date fromDay,
Date toDay)
Get task annotations for a year.
|
long |
getYearlyTaskTime(TimerTask task,
Date year,
Date fromDay,
Date toDay)
Get task proper time for a year.
|
long |
getYearlyTotalTaskTime(TimerTask task,
Date year,
Date fromDay,
Date toDay)
Get task total time (including subtask) for a year.
|
public List<Date> getDailyDates(Date begin, Date end)
begin
- begin dateend
- end datepublic List<Date> getWeeklyDates(Date begin, Date end)
begin
- begin dateend
- end datepublic List<Date> getMonthlyDates(Date begin, Date end)
begin
- begin dateend
- end datepublic List<Date> getYearlyDates(Date begin, Date end)
begin
- begin dateend
- end dateprotected List<Date> getPeriodDates(Date begin, Date end, int calendarField)
begin
- begin dateend
- end datecalendarField
- calendar field to incrementpublic long getDailyTaskTime(TimerTask task, Date day)
task
- taskday
- daypublic long getWeeklyTaskTime(TimerTask task, Date week, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the week week
. Thus you can get weekly task time from tuesday to wednesday.task
- taskweek
- weekfromDay
- from day (inclusive)toDay
- to day (inclusive)public long getMonthlyTaskTime(TimerTask task, Date month, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the month month
. Thus you can get monthly task time from third day to twelfth day.task
- taskmonth
- monthfromDay
- from day (inclusive)toDay
- to day (inclusive)public long getYearlyTaskTime(TimerTask task, Date year, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the year year
. Thus you can get yearly task time from 03/01 to 31/07.task
- taskyear
- yearfromDay
- from day (inclusive)toDay
- to day (inclusive)public long getDailyTotalTaskTime(TimerTask task, Date day)
task
- taskday
- daypublic long getWeeklyTotalTaskTime(TimerTask task, Date week, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the week week
. Thus you can get weekly task time from tuesday to wednesday.task
- taskweek
- weekfromDay
- from day (inclusive)toDay
- to day (inclusive)public long getMonthlyTotalTaskTime(TimerTask task, Date month, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the month month
. Thus you can get monthly task time from third day to twelfth day.task
- taskmonth
- monthfromDay
- from day (inclusive)toDay
- to day (inclusive)public long getYearlyTotalTaskTime(TimerTask task, Date year, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the year year
. Thus you can get yearly task time from 03/01 to 31/07.task
- taskyear
- yearfromDay
- from day (inclusive)toDay
- to day (inclusive)public String formatDuration(long duration)
duration
- duration in secondspublic Map<Date,String> getDailyTaskAnnotation(TimerTask task, Date day)
task
- taskday
- daypublic Map<Date,String> getWeeklyTaskAnnotation(TimerTask task, Date week, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the week week
. Thus you can get weekly task annotations from tuesday to wednesday.task
- taskweek
- weekfromDay
- from day (inclusive)toDay
- to day (inclusive)public Map<Date,String> getMonthlyTaskAnnotation(TimerTask task, Date month, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the month month
. Thus you can get monthly task annotations from third day to twelfth day.task
- taskmonth
- monthfromDay
- from day (inclusive)toDay
- to day (inclusive)public Map<Date,String> getYearlyTaskAnnotation(TimerTask task, Date year, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the year year
. Thus you can get yearly task annotations from 03/01 to 31/07.task
- taskyear
- yearfromDay
- from day (inclusive)toDay
- to day (inclusive)Copyright © 2007–2013 CodeLutin. All rights reserved.