Menstrual Tracking Calendar

I am developing a calendar that is designed to calculate the menstrual cycle, I have to allocate days for the next phase, they

  • Bleeding days
  • Fertile phase
  • Ovulation day

The data that I have for the process

  • The user selects the start date of the period.

  • The default menstrual range is 28 days

Data processing

With the start date of the period and the range of cycles, the above formulas will be applied

to calculate three different date ranges

Using a date range, date highlighting will be applied throughout the year and upcoming years.

Calculation steps for all ranges

Calculation of the date of bleeding

Assume that the date selected by the user as “a” Assume that the default period cycle is “X”

days of bleeding = x + 3 days

Fertile Phase Calculationaion

I

1

1

b = [{a + (x-1) -19}]

II

= [{ + (-1) -10}]

(b + 1) (c-1) -

= [(b-1) + {(c-b)/2}]

jqm calendar

: , highlighting of days

+4
1

, ( , ). , " ".

, . :

var periodCycleDays = 28;
var fertilePhaseStart = periodCycleDays - 20;
var fertilePhaseEnd = periodCycleDays - 11;
var ovulation = (fertilePhaseStart-1) + (fertilePhaseEnd - fertilePhaseStart)/2;

, , . , , , , . ( ) .

, : http://jsfiddle.net/2sf4gfdr/

+2

Source: https://habr.com/ru/post/1569157/


All Articles