Logo Search packages:      
Sourcecode: pcalendar version File versions  Download package

Date net::sf::linuxorg::pcal::engine::Engine::getMensPeriodOvulationDate ( final Date  periodStartDate ) [inline, private]

This method locates the menstrual period ovulation date

periodStartDate- period start date
ovulation date or null if periodStartDate does not contain an ovulation date

Definition at line 526 of file Engine.java.

References dateDiff(), and dateTypes.

Referenced by getDayInfoRecorded().

            Date periodOvulationDate = null;

            if(periodStartDate == null) return periodOvulationDate;
            if(dateTypes.get(periodStartDate) == null) return periodOvulationDate; 

            periodOvulationDate = startDates.higher(periodStartDate);

            if(periodOvulationDate != null) {
                  if(dateTypes.get(periodOvulationDate) == PCAL_TYPE_OVULATION) {
                        int ovulationDayNumber = dateDiff(periodStartDate, periodOvulationDate);
                        if(ovulationDayNumber>(enginePreferences.regularMaxLength)) {
                              // this ovulation is beyond this period
                              periodOvulationDate = null;
                  } else {
                        periodOvulationDate = null;
            return periodOvulationDate; 

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index