Author |
Topic |
bjlt
Senior Member
1144 Posts |
Posted - 29 November 2001 : 10:26:12
|
translation of the js done. http://beijinglife.com/js/lunar_calendar_worldtime_en.js
note on chinese gan-zhi.
12 "hours" a day, hour Zi begins at 23:00 and ends at 1:00 the next day. GanZhi of month relates to Jieqi ( solar terms) but not the month. hence new ganzhi of the year begins at the beginning of the spring instead of the new year of lunar calendar.
|
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 29 November 2001 : 10:31:48
|
Rick,
Done and sent back
Thanks Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 03 December 2001 : 18:27:24
|
Got a error I can't figure out :(
when viewing a profile, just one so far the rest work: I get this error:
Microsoft VBScript runtime error '800a0009'
Subscript out of range: '[number: 12]'
/inc_functions.asp, line 2956
Ok.. in the inc_functions.asp line 2956 is in red:
function StarSign(zday,zmonth)
starsigns = Array("Capricorn","Aquarius","Pisces","Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius") horroscopes = Array( 20, 19, 21, 21, 21, 21, 22, 22, 22, 23, 22, 21) starsymbols = Array("Goat","Water Bearer","Fishes","Ram","Bull","Twins","Crab","Lion","Virgin","Balance","Scorpion","Archer")
if zday < horroscopes(zmonth) then StarSign = starsigns(zmonth) & " the " & starsymbols(zmonth) elseif zmonth = 12 then StarSign = starsigns(1) & " the " & starsymbols(1) else StarSign = starsigns(zmonth+1) & " the " & starsymbols(zmonth+1) end if
end function
Test Site: EastPasco Huw's Code 3.3.10 SQL 2000 Snitz Mod Resource Email |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 03 December 2001 : 18:43:41
|
Looking at the code this error will occur everytime the statement in red is encountered, when you try to view a profile where the birth Month is 11.
How you pass the values to check for the Sign? This should be in pop_profile.asp.
GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Edited by - GauravBhabu on 03 December 2001 19:12:31 |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 03 December 2001 : 19:36:58
|
<% ' Calculations for various birthday functions strBirthdate = rs("M_BIRTHDATE") & "000001" strBirthdate = strToDate (strBirthdate) Age = GetAge(strBirthdate) 'Optional Line To Calculate Age in Days IngDays = DateDiff("d", strBirthDate, Date)
currday = CInt(day(strBirthdate)) currmonth = CInt(month(strBirthdate)) curryear = CInt(year(strBirthdate)) day2 = datepart("w",strBirthdate) weekdy = weekday(day2) month1 = month(strBirthdate) - 1
'optional Lines to calculate birthstone, quality, ChineseStarsign, Starsign birthstones = Array("Garnet","Amethyst","Aquamarine, Bloodstone","Diamond","Emerald","Pearl, Alexandrite, Moonstone","Ruby","Peridot, Sardonyx","Sapphire","Opal, Tourmaline","Topaz","Turquoise, Zircon") qualities = Array("Constancy","Sincerity","Courage","Innocence","Love, success","Health, longevity","Contentment","Married happiness","Clear thinking","Hope","Fidelity","Prosperity") weekdays = Array("Sunday","Monday","Tuesday","Wednesday","Thurdsay","Friday","Saturday") Birthstone = Birthstones(month1) Quality = qualities(month1) chineseyearrange = "" Zrange = StarDate(currday,currmonth,curryear) chineseyear = Chinese(currday,currmonth,curryear) %>
Test Site: EastPasco Huw's Code 3.3.10 SQL 2000 Snitz Mod Resource Email |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 03 December 2001 : 19:53:26
|
From where do you call - function StarSign(zday,zmonth)
GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying. |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 03 December 2001 : 20:00:41
|
In the inc_functions.asp file look above a couple post ^^
Test Site: EastPasco Huw's Code 3.3.10 SQL 2000 Snitz Mod Resource Email |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 03 December 2001 : 20:15:55
|
I see that. But where do you call it from?
GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying. |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 03 December 2001 : 20:25:13
|
This is all I have in pop_profile.asp:
<% '################## concep86 / Azaniah birthday mod #################### %> <!-- <tr> <td bgColor=<% =strPopUpTableColor %> align=right nowrap valign=top><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Date of Birth: </font></b></td> <% if(HideAge = 0) then %> <td bgColor="<% =strPopUpTableColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% = ChkString(rs("M_SEX"), "display") %></font></td> <% else %> <td bgColor="<% =strPopUpTableColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">No date of birth specified...</font></td> <% end if %> </tr> --> <tr> <td bgColor=<% =strPopUpTableColor %> align=right nowrap valign=top><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Age: </font></b></td> <% if(HideAge = 0) then %> <% ' Calculations for various birthday functions strBirthdate = rs("M_BIRTHDATE") & "000001" strBirthdate = strToDate (strBirthdate) Age = GetAge(strBirthdate) 'Optional Line To Calculate Age in Days IngDays = DateDiff("d", strBirthDate, Date)
currday = CInt(day(strBirthdate)) currmonth = CInt(month(strBirthdate)) curryear = CInt(year(strBirthdate)) day2 = datepart("w",strBirthdate) weekdy = weekday(day2) month1 = month(strBirthdate) - 1
'optional Lines to calculate birthstone, quality, ChineseStarsign, Starsign birthstones = Array("Garnet","Amethyst","Aquamarine, Bloodstone","Diamond","Emerald","Pearl, Alexandrite, Moonstone","Ruby","Peridot, Sardonyx","Sapphire","Opal, Tourmaline","Topaz","Turquoise, Zircon") qualities = Array("Constancy","Sincerity","Courage","Innocence","Love, success","Health, longevity","Contentment","Married happiness","Clear thinking","Hope","Fidelity","Prosperity") weekdays = Array("Sunday","Monday","Tuesday","Wednesday","Thurdsay","Friday","Saturday") Birthstone = Birthstones(month1) Quality = qualities(month1) chineseyearrange = "" Zrange = StarDate(currday,currmonth,curryear) chineseyear = Chinese(currday,currmonth,curryear) %>
<td bgColor="<% =strPopUpTableColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><%= ChkString(Age, "disply") %></font><BR> Born: <%= WeekdayName(weekdy) %>, <%= currday & Nths(currday) %> <%= MonthName(currmonth) %> <%= curryear %><br> <!-- Optional Line to show Age in days --> They are <%= IngDays %> days old.<br> <!-- Optional Line to show Birthstone and quality --> Birthstone: <%= Birthstone %> - <%= quality %><br> <!-- Optional Lines to Starsign and range of dates --> Starsign: <%= StarSign(currday,month1) %><br> <%= Zrange %><BR> <!-- Optional Lines to show Chinese Starsign and rangd --> Chinese Starsign: <%= chineseyear %><br> <%= chineseyearrange %><br> </td>
<% else %> <td bgColor="<% =strPopUpTableColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">No age specified...</font></td> </tr> <% '################## concep86 / Azaniah birthday mod #################### %>
Test Site: EastPasco Huw's Code 3.3.10 SQL 2000 Snitz Mod Resource Email |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 03 December 2001 : 20:31:15
|
I'm still learning so point me in the right direction if that's not it
Test Site: EastPasco Huw's Code 3.3.10 SQL 2000 Snitz Mod Resource Email |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 03 December 2001 : 20:36:02
|
elseif zmonth = 12 then StarSign = starsigns(1) & " the " & starsymbols(1)
Change it to
elseif zmonth = 11 then StarSign = starsigns(0) & " the " & starsymbols(0)
Hopefully this will fix it.
GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying. |
|
|
rick7165
Senior Member
USA
1094 Posts |
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 04 December 2001 : 07:11:00
|
opps
It's those darn VBScript arrays (why can't they start at 1 and just be sensible like javascript)...
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
Raichelle
Junior Member
370 Posts |
Posted - 04 December 2001 : 21:13:39
|
AZ I am having some problems with this mod do you think you can help me out? I emailed you using the email address on your profile with my problem I don't know if thats your main email address that you uses
thanks rai
|
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 05 December 2001 : 05:33:14
|
quote:
opps
It's those darn VBScript arrays (why can't they start at 1 and just be sensible like javascript)...
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines.
Actually I prefer VBScript, but that whole array thing does annoy me....
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
Topic |
|
|
|