dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08921
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2252: Clear time of Birthday property of patient.
------------------------------------------------------------
revno: 2252
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2010-12-02 15:57:16 +0700
message:
Clear time of Birthday property of patient.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.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-api/src/main/java/org/hisp/dhis/patient/Patient.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java 2010-12-01 08:25:17 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java 2010-12-02 08:57:16 +0000
@@ -394,6 +394,10 @@
public void setBirthDateFromAge( int age, char ageType )
{
Calendar todayCalendar = Calendar.getInstance();
+ todayCalendar.clear( Calendar.MILLISECOND );
+ todayCalendar.clear( Calendar.SECOND );
+ todayCalendar.clear( Calendar.MINUTE );
+ todayCalendar.set( Calendar.HOUR_OF_DAY, 0 );
// Assumed relative to the 1st of January
// todayCalendar.set( Calendar.DATE, 1 );