If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

40 to 42 weeks is considered the normal gestation period and from that you can extrapolate a basic script.

The calculator uses a server-side script to perform its calculations but you can obtain an idea of the parameters by passing the script a number of parameters to obtain an idea of the algorithm that it is using.

Using the following parameters...

December 3 / 2013 and 28 days cycle the script outputs the following information.

Your next menstrual period is expected to start on December 31, 2013.

Your next most fertile period is December 15, 2013 to December 19, 2013.

If you conceive within this timeframe, your estimated due date will be September 09, 2014.

======================

So putting the data in to a spread sheet (for simplicity) I found that they were using 36 weeks as a guide which IMHO is not a good calculation and over simplistic because 252/28 = 9

You have 90 days in a quarter ... 270 days is 9 months, not 252.

I would say that the calculator has a fundamental flaw in two respects, firstly each pregnancy is different and baby comes when its due and the math behind the calculator is not as accurate as it could be.

--> JavaScript Frameworks like JQuery, Angular, Node <--
... and please remember to wrap code with forum BBCode tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...

The simplicity of this should be a case of sign posting and letting the OP to get on with it themselves, if they want to learn JS then this is the best way, doing something for someone does not help that person learn does it?

1. You need to grab a date, that would be best using a pull down menu of day / month / year
2. you need to add at least 9 months 2 weeks to that date or rough it out to ((365 / 4) * 3)+14
3 using the javascript setDate() function to add those number of days to the date object generated from the input, you can get a possible DOB.

Job done, only thing needed is a nice header graphic and some CSS.

--> JavaScript Frameworks like JQuery, Angular, Node <--
... and please remember to wrap code with forum BBCode tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...

Estimated Fertility between 10-20 days after "first day of last menstrual period"
Estimated Conception Date between 14 days after "first day of last menstrual period"
Estimated Due date 280 days or 40 weeks after "first day of last menstrual period"
This is what I need
For example:
If first day of last menstrual period is: 1/12/13 (dd/mm/yy)
so....
Estimated Fertility: 10/12/13-20/12/13
Estimated Conception Date: 14/12/13
Estimated Due date: 07/09/14
Unfortunately I do not know the language of JS, so I'm asking for your help!
Thank you!

Estimated Fertility between 10-20 days ... Unfortunately I do not know the language of JS, so I'm asking for your help!
Thank you!

You gave most of what I need to give you help. I don't know the Hebrew month names nor the length of each. I seem to remember that Second-Adar gets to pop in and out "as needed" to really mess things up! I need the details on that.

I am feeling pretty generous, as you are a beginner, try to work with this as a base and work out what you need to do to get the desired results, this is as close as you are going to get to what you want.

Excuse the translations, you have google to thank for that.

If you need help understanding any of it and why I went down this particular route / method then let me know what it is and I will answer as best I can so you can understand.

The only proviso I have on this is you give some credit and the URL remains in the page.

Thank you! But the calculator is not accurate.
I compare the different pregnancy calculator and the results are different.
Overall difference between first menstrual date to Birth date is 280 days. Why you use 287.75 days?