% Option Explicit %> <% if PG="" then PG = "ATM OB Calculator" if HREFOFST="" then HREFOFST = "" if UPDATED="" then UPDATED = "December 28, 2007" if JSCRIPT="" then JSCRIPT = "" if LOGINREQUIRED="" then LOGINREQUIRED = "" dim z dim D_Months, D_Weekday Set D_Months = Server.CreateObject("Scripting.Dictionary") D_Months.add 1, "January" D_Months.add 2, "February" D_Months.add 3, "March" D_Months.add 4, "April" D_Months.add 5, "May" D_Months.add 6, "June" D_Months.add 7, "July" D_Months.add 8, "August" D_Months.add 9, "September" D_Months.add 10, "October" D_Months.add 11, "November" D_Months.add 12, "December" Set D_Weekday = Server.CreateObject("Scripting.Dictionary") D_Weekday.add 1, "Sunday" D_Weekday.add 2, "Monday" D_Weekday.add 3, "Tuesday" D_Weekday.add 4, "Wednesday" D_Weekday.add 5, "Thursday" D_Weekday.add 6, "Friday" D_Weekday.add 7, "Saturday" function MonthLength(monthNum, theYr) dim isLeap select case monthNum case 1 MonthLength = 31 case 2 isLeap = ((CInt(theYr) mod 4) = 0) if isLeap then MonthLength = 29 else MonthLength = 28 end if case 3 MonthLength = 31 case 4 MonthLength = 30 case 5 MonthLength = 31 case 6 MonthLength = 30 case 7 MonthLength = 31 case 8 MonthLength = 31 case 9 MonthLength = 30 case 10 MonthLength = 31 case 11 MonthLength = 30 case 12 MonthLength = 31 case else MonthLength = 0 end select end function dim mn, theDay, yr, obtype, yourname, cycle if PGPOSTED then mn = request.form("month") theDay = request.form("day") yr = request.form("year") obtype = request.form("obtype") yourname = request.form("yourname") cycle = request.form("cycle") else mn = D_Months.item(Month(Now())) theDay = Day(Now()) yr = Year(Now()) obtype = "" yourname = "" cycle = 28 end if %>
Due Date Calculator
|
||||||||||||||||||||||||||||||
<%
if PGPOSTED then
dim DArr(366), dateStr
dateStr = mn & " " & theday & ", " & yr
select case obtype
case "menses"
'do nothing
case "conception"
dateStr = DateAdd("d", x - 13, dateStr)
case "duedate"
dateStr = DateAdd("d", x - 280, dateStr)
end select
for x = 1 to 366
DArr(x) = DateAdd("d", x - 1, dateStr)
next
%>
Congratulations!
Your Pregnancy Calendar
|