Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculations info #121

Merged
merged 5 commits into from
Oct 3, 2023
Merged

Calculations info #121

merged 5 commits into from
Oct 3, 2023

Conversation

IraSoro
Copy link
Owner

@IraSoro IraSoro commented Oct 2, 2023

Closed #118

I wrote in detail what rules we use to base our calculations. Please check it carefully. If you find grammatical errors, correct them yourself and commit.

@IraSoro IraSoro added this to the v2.3.1 milestone Oct 2, 2023
@IraSoro IraSoro self-assigned this Oct 2, 2023

Весь менструальный цикл можно разделить на 2 фазы: фолликулярную и лютеиновую. Фолликулярна фаза начинается с первого дня месячных и заканчивается овуляцией. Лютеиновая фаза начинается после овуляции и заканчивается месячными. В течение этих фаз главные гормоны постоянно перестраиваются, что сказывается на самочувствие. Ниже на картинке представлен график 28-дневного цикла. На нем показано, как меняются гормоны в каждую фазу.

![Фазы менструального цикла](https://qpicture.ru/images/2022/12/27/crc.jpg)
Copy link
Collaborator

@imblowfish imblowfish Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image from remote server may be deleted. Let's save it and use our local copy

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to insert my own image in the future.
So I don't want to save these images. If you save them, you need to write links.

```ts
function getOvulationStatus(startDate: Date, cycleLength: number){
const currentDay = getCurrentDay(startDate, cycleLength);
const diff = cycleLength - currentDay;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about diffInDays?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@@ -0,0 +1,191 @@
# Description of calculations

Let us introduce two basic concepts that are necessary for calculations: cycle length and period length.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


## Calculation the expected start date of the next period

Let's say we know the start date of the last period and average cycle length. Then, to calculate the start date of the next period you need:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should instead of you need?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Another example with dates:
Let period (and therefore the cycle) begin on January 1, the average length of cycle is 25 days. Then ovulation will occur on the 11th day of the cycle, that is, January 11.

So the function will look like this:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will looks like this

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is the future tense.
But I can rewrite this sentence in simple tense.

@IraSoro IraSoro merged commit 534d817 into master Oct 3, 2023
2 checks passed
@IraSoro IraSoro deleted the 118-calculations-info branch October 3, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Write info about calculations
2 participants