melika_1st
سه شنبه 23 اردیبهشت 1382, 15:32 عصر
چطور می شود تاریخ را که در dadabase به صورت میلادی است به صورت شمسی نشان داد.
مثل forum جدید و قدیم این سایت.
با تشکر فراوان
komeil64
سه شنبه 23 اردیبهشت 1382, 21:00 عصر
سلام
اینم کدش:
<%@Language=VBScript%>
<META http-equiv=CONTENT-TYPE content="text/html; charset=utf-8">
<%
D = Array (20, 19, 20, 20, 21, 21, 22, 22, 22, 22, 21, 21)
P = Array (11, 12, 10, 12, 11, 11, 10, 10, 10, 9, 10, 10)
W = Array ("یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه")
Mon = Array ("فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند")
Dm = Day(Date)
Mm = Month(Date)
Ym = Year(Date)
U = 0
Rp = 0
If (Ym Mod 4) = 0 Then U = 1
If ((Ym Mod 100) = 0 AND (Ym Mod 400) <> 0) Then U = 0
Ys = Ym - 622
X = Ys - 22
X = X Mod 33
If ((X Mod 4) = 0 AND X <> 32) Then Rp = 1
I = Not(Rp-2) + NOT(U - 2) * 2
X = 0
If (I = 0 AND Mm = 3) Then X = 1
If I = 0 Then I = 3
Ms = (9 + Mm) Mod 13
If Ms < 10 Then Ms = Ms + 1
D1 = D(Mm - 1)
If (I = 1 AND Mm > 2) Then D1 = D1 - 1
If (I = 2 AND Mm < 3) then D1 = D1 - 1
P1 = P(Mm - 1)
If (I = 1 AND Mm > 2) Then P1 = P1 + 1
If (I = 2 AND Mm < 4) Then P1 = P1 + 1
If (Dm > 0 AND Dm <= D1) Then
Ds = P1 + Dm + X - 1
X = 1
Else
Ds = Dm - D1
Ms = Ms + 1
If Ms = 13 Then Ms = 1
X = 2
End If
If ((Mm = 3 AND X = 2) OR Mm > 3) Then Ys = Ys + 1
DateShamsi = W(WeekDay(Date) - 1) & "&" & Ds & "&" & Mon(Ms - 1) & "&" & Ys
%>
<%= DateShamsi %>
babak_dvr
سه شنبه 27 بهمن 1383, 09:59 صبح
thanks
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.