ساعت شمسي سرور

nima_isp

Member
سلام آيا راهي وجود داره توي اي اس پي تارخ شمسي رو بدست آورد و اونو توي يه متغير ريخت كسي سمپل داره
 

AliReza26

Active Member
بفرما....


اين كد تبديل تقويم ميلادي به شمسي است توي ASP :

کد:
<%
'#########################################
'/////////////////////////
'////////AliReza26////////
'////////Tarahi.net///////
'/////////////////////////
'#########################################

'@@@@@  Begin   @@@@@

function days()

Dim stryear, strmonth, strday 

        If Month(Now) = 4 Or Month(Now) = 5 Or Month(Now) = 6 Or Month(Now) = 7 Or Month(Now) = 8 Or Month(Now) = 9 Or Month(Now) = 10 Or Month(Now) = 11 Or Month(Now) = 12 Then
            stryear = Year(Now) - 621
        ElseIf Month(Now) = 1 Or Month(Now) = 2 Then
            stryear = Year(Now) - 622
        ElseIf Month(Now) = 3 Then
            If day(now) > 19 Then
                stryear = Year(Now) - 621
            Else
                stryear = Year(Now) - 622
            End If
        End If


        If Month(Now) = 4 Then
            If day(now) <= 19 Then
                strday = day(now) + 12
                strmonth = "فروردین"
            Else
                strday = day(now) - 19
                strmonth = "اردیبهشت"
            End If


        ElseIf Month(Now) = 5 Then
            If day(now) <= 20 Then
                strday = day(now) + 11
                strmonth = "اردیبهشت"
            Else
                strday = day(now) - 20
                strmonth = "خرداد"
            End If


        ElseIf Month(Now) = 6 Then
            If day(now) <= 20 Then
                strday = day(now) + 11
                strmonth = "خرداد"
            Else
                strday = day(now) - 20
                strmonth = "تیر"
            End If


        ElseIf Month(Now) = 7 Then
            If day(now) <= 21 Then
                strday = day(now) + 10
                strmonth = "تیر"
            Else
                strday = day(now) - 21
                strmonth = "مرداد"
            End If


        ElseIf Month(Now) = 8 Then
            If day(now) <= 21 Then
                strday = day(now) + 10
                strmonth = "مرداد"
            Else
                strday = day(now) - 21
                strmonth = "شهریور"
            End If


        ElseIf Month(Now) = 9 Then
            If day(now) <= 21 Then
                strday = day(now) + 10
                strmonth = "شهریور"
            Else
                strday = day(now) - 21
                strmonth = "مهر"
            End If



        ElseIf Month(Now) = 10 Then
            If day(now) <= 21 Then
                strday = day(now) + 9
                strmonth = "مهر"
            Else
                strday = day(now) - 21
                strmonth = "آبان"
            End If


        ElseIf Month(Now) = 11 Then
            If day(now) <= 20 Then
                strday = day(now) + 10
                strmonth = "آبان"
            Else
                strday = day(now) - 20
                strmonth = "آذر"
            End If


        ElseIf Month(Now) = 12 Then
            If day(now) <= 20 Then
                strday = day(now) + 10
                strmonth = "آذر"
            Else
                strday = day(now) - 20
                strmonth = "دی"
            End If


        ElseIf Month(Now) = 1 Then
            If day(now) <= 19 Then
                strday = day(now) + 11
                strmonth = "دی"
            Else
                strday = day(now) - 19
                strmonth = "بهمن"
            End If


        ElseIf Month(Now) = 2 Then
            If day(now) <= 18 Then
                strday = day(now) + 12
                strmonth = "بهمن"
            Else
                strday = day(now) - 18
                strmonth = "اسفند"
            End If


        ElseIf Month(Now) = 3 Then
            If day(now) <= 19 Then
                strday = day(now) + 10
                strmonth = "اسفند"
            Else
                strday = day(now) - 19
                strmonth = "فروردین"
            End If


        End If

       dim strrozehafte

        If Weekday(Now) = 7 Then
            strrozehafte = "شنبه"
        ElseIf Weekday(Now) = 1 Then
            strrozehafte = "یکشنبه"
        ElseIf Weekday(Now) = 2 Then
            strrozehafte = "دوشنبه"
        ElseIf Weekday(Now) = 3 Then
            strrozehafte = "سه شنبه"
        ElseIf Weekday(Now) = 4 Then
            strrozehafte = "چهار شنبه"
        ElseIf Weekday(Now) = 5 Then
            strrozehafte = "پنج شنبه"
        ElseIf Weekday(Now) = 6 Then
            strrozehafte = "جمعه"
        End If



        strtaghvim =     " امروز" & " : " & strrozehafte & " " & strday &  " " & strmonth & " " &  stryear
        response.write(strtaghvim)

end function

'@@@@@   END    @@@@@
'###########################################################################







'@@@@@    Callin function     @@@@@


call days()

%>
 

جدیدترین ارسال ها

بالا