------------------------------------------------------------ revno: 17899 committer: Lars Helge Overland <larshe...@gmail.com> branch nick: dhis2 timestamp: Wed 2015-01-07 10:19:38 +0100 message: Analytics, removed unused methods modified: dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.java
-- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.java' --- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.java 2015-01-07 02:53:15 +0000 +++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/PartitionUtils.java 2015-01-07 09:19:38 +0000 @@ -28,25 +28,24 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Set; + import org.apache.commons.lang.StringUtils; import org.hisp.dhis.analytics.Partitions; +import org.hisp.dhis.calendar.Calendar; import org.hisp.dhis.calendar.DateTimeUnit; import org.hisp.dhis.common.ListMap; import org.hisp.dhis.common.NameableObject; -import org.hisp.dhis.period.Cal; import org.hisp.dhis.period.Period; import org.hisp.dhis.period.PeriodType; import org.hisp.dhis.period.YearlyPeriodType; import org.hisp.dhis.system.util.UniqueArrayList; import org.joda.time.DateTime; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Collection; -import java.util.Date; -import java.util.List; -import java.util.Set; - /** * @author Lars Helge Overland */ @@ -69,7 +68,7 @@ if ( lastYears != null ) { - org.hisp.dhis.calendar.Calendar calendar = PeriodType.getCalendar(); + Calendar calendar = PeriodType.getCalendar(); DateTimeUnit dateTimeUnit = calendar.today(); dateTimeUnit = calendar.minusYears( dateTimeUnit, lastYears - 1 ); dateTimeUnit.setMonth( 1 ); @@ -143,20 +142,4 @@ return map; } - - /** - * Returns the year of the given date. - */ - public static int year( Date date ) - { - return new Cal( date ).getYear(); - } - - /** - * Returns the max date within the year of the given date. - */ - public static Date maxOfYear( Date date ) - { - return new Cal( year( date ), 12, 31, true ).time(); - } }
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp