dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #00320
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 100: Minor fix
------------------------------------------------------------
revno: 100
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Fri 2009-03-20 17:38:30 +0100
message:
Minor fix
modified:
dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/AverageBoolDataElementAggregation.java
dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/AverageIntDataElementAggregation.java
dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/SumBoolDataElementAggregation.java
dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/SumIntDataElementAggregation.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java
=== modified file 'dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/AverageBoolDataElementAggregation.java'
--- dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/AverageBoolDataElementAggregation.java 2009-03-09 08:28:19 +0000
+++ dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/AverageBoolDataElementAggregation.java 2009-03-20 16:38:30 +0000
@@ -38,7 +38,7 @@
import org.hisp.dhis.organisationunit.OrganisationUnitHierarchy;
import org.hisp.dhis.period.Period;
-import static org.hisp.dhis.system.util.MathUtils.getDays;
+import static org.hisp.dhis.system.util.DateUtils.getDays;
/**
* @author Lars Helge Overland
=== modified file 'dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/AverageIntDataElementAggregation.java'
--- dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/AverageIntDataElementAggregation.java 2009-03-09 08:28:19 +0000
+++ dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/AverageIntDataElementAggregation.java 2009-03-20 16:38:30 +0000
@@ -40,7 +40,7 @@
import org.hisp.dhis.organisationunit.OrganisationUnitHierarchy;
import org.hisp.dhis.period.Period;
-import static org.hisp.dhis.system.util.MathUtils.getDays;
+import static org.hisp.dhis.system.util.DateUtils.getDays;
/**
* @author Lars Helge Overland
=== modified file 'dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/SumBoolDataElementAggregation.java'
--- dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/SumBoolDataElementAggregation.java 2009-03-09 08:28:19 +0000
+++ dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/SumBoolDataElementAggregation.java 2009-03-20 16:38:30 +0000
@@ -39,7 +39,7 @@
import org.hisp.dhis.period.Period;
import static org.hisp.dhis.system.util.MathUtils.getFloor;
-import static org.hisp.dhis.system.util.MathUtils.getDays;
+import static org.hisp.dhis.system.util.DateUtils.getDays;
/**
=== modified file 'dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/SumIntDataElementAggregation.java'
--- dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/SumIntDataElementAggregation.java 2009-03-09 08:28:19 +0000
+++ dhis-2/dhis-services/dhis-service-aggregationengine-default/src/main/java/org/hisp/dhis/aggregation/impl/dataelement/SumIntDataElementAggregation.java 2009-03-20 16:38:30 +0000
@@ -38,7 +38,7 @@
import org.hisp.dhis.organisationunit.OrganisationUnitHierarchy;
import org.hisp.dhis.period.Period;
-import static org.hisp.dhis.system.util.MathUtils.getDays;
+import static org.hisp.dhis.system.util.DateUtils.getDays;
/**
* @author Lars Helge Overland
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java 2009-03-20 15:18:04 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java 2009-03-20 16:38:30 +0000
@@ -156,6 +156,18 @@
}
/**
+ * Returns the number of days since 01/01/1970. The value is rounded off to
+ * the floor value and does not take daylight saving time into account.
+ *
+ * @param date the date.
+ * @return number of days since Epoch.
+ */
+ public static long getDays( Date date )
+ {
+ return date.getTime() / MS_PER_DAY;
+ }
+
+ /**
* Returns the number of days between the start date (inclusive) and end
* date (exclusive). The value is rounded off to the floor value and does
* not take daylight saving time into account.
--
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.