این برنامه ای هست که تو اکثر سایت ها میشه پیداش کرد ولی اینو به کجای برنامه اصلی باید اضافه کنم تا روی ال سی دی تاریخ شمسی رو نمایش بده؟ :mrgreen:
[code=vb]
$regfile = "m16def.dat"
$crystal = 1000000
$lib "mcsbyteint.lbx"
Dim Myear As Integer 'input Miladi(gregorian) Year
Dim Mday As Integer 'input Miladi Day
Dim Mmonth As Integer 'input Miladi Month
Dim Mdayofyear As Integer
Dim Myear_ As Integer
Dim Jday As Integer 'output Jalali(shamsi) Day
Dim Jmonth As Integer 'output Jalali Month
Dim Jyear As Integer 'output Jalali Year
Dim Jdayofyear As Integer
Dim Gnumdayofyear As Integer
Dim Isleapyear As Bit
Dim Isleapyearp As Bit
Dim Iloop As Byte
Dim Temp1 As Integer
Dim Temp2 As Integer
Dim Temp3 As Integer
Dim Temp4 As Integer
Dim Jmonth_a(12) As Byte
Dim Mmonth_a(12) As Byte
Mmonth_a(1) = 31
'——–28 Ya 29 Agar Sall Kabiseh Bashad In Mah 29 Roz Mibashad—————— –
Mmonth_a(2) = 28
Mmonth_a(3) = 31
Mmonth_a(4) = 30
Mmonth_a(5) = 31
Mmonth_a(6) = 30
Mmonth_a(7) = 31
Mmonth_a(8) = 31
Mmonth_a(9) = 30
Mmonth_a(10) = 31
Mmonth_a(11) = 30
Mmonth_a(12) = 31
Gnumdayofyear = 365
Myear = 2008 'sample Miladi(gregorian) Year
Mday = 28 'sample Miladi Day
Mmonth = 8
Mdayofyear = 0 'sample Miladi Month
'————–shart Kabiseh Bodane Sall———— -
Temp1 = Myear Mod 4
Temp2 = Myear Mod 100
Temp3 = Myear Mod 400
Temp4 = Temp1 And Temp2
If Temp4 <> 0 Or Temp3 = 0 Then
Mmonth_a(2) = 28
Else
Mmonth_a(2) = 29
End If
Myear_ = Myear - 1
Temp1 = Myear_ Mod 4
Temp2 = Myear_ Mod 100
Temp3 = Myear_ Mod 400
Temp4 = Temp1 And Temp2
If Temp4 <> 0 Or Temp3 = 0 Then
Reset Isleapyearp
Else
Set Isleapyearp
End If
Temp1 = Mmonth - 1
For Iloop = 1 To Temp1
Mdayofyear = Mmonth_a(iloop) + Mdayofyear
Next
Mdayofyear = Mday + Mdayofyear
If Mdayofyear > 79 Then
Temp1 = Mdayofyear - 79
Jyear = Myear - 621
If Temp1 < 186 Then
Temp2 = Temp1 Mod 31
Temp3 = Temp1 / 31
If Temp2 = 0 Then
Jmonth = Temp3
Jday = 31
Else
Jmonth = Temp3 + 1
Jday = Temp2
End If
Else
Temp2 = Temp1 - 186
Temp3 = Temp2 Mod 30
Temp4 = Temp2 / 30
If Temp3 = 0 Then
Jmonth = Temp4 + 6
Jday = 30
Else
Jmonth = Temp4 + 7
Jday = Temp3
End If
End If
Else
Jyear = Myear - 622
If Isleapyearp = 1 Then
Mdayofyear = Mdayofyear + 11
Else
Mdayofyear = Mdayofyear + 10
End If
Temp2 = Mdayofyear Mod 30
Temp3 = Mdayofyear / 30
If Temp2 = 0 Then
Jmonth = Temp3 + 9
Jday = 30
Else
Jmonth = Temp3 + 10
Jday = Temp2
End If
Waitms 1
End If
[/code]
[move]لطفا راهنمایی فرمایید[/move]
[code=vb]
$regfile = "m16def.dat"
$crystal = 1000000
$lib "mcsbyteint.lbx"
Dim Myear As Integer 'input Miladi(gregorian) Year
Dim Mday As Integer 'input Miladi Day
Dim Mmonth As Integer 'input Miladi Month
Dim Mdayofyear As Integer
Dim Myear_ As Integer
Dim Jday As Integer 'output Jalali(shamsi) Day
Dim Jmonth As Integer 'output Jalali Month
Dim Jyear As Integer 'output Jalali Year
Dim Jdayofyear As Integer
Dim Gnumdayofyear As Integer
Dim Isleapyear As Bit
Dim Isleapyearp As Bit
Dim Iloop As Byte
Dim Temp1 As Integer
Dim Temp2 As Integer
Dim Temp3 As Integer
Dim Temp4 As Integer
Dim Jmonth_a(12) As Byte
Dim Mmonth_a(12) As Byte
Mmonth_a(1) = 31
'——–28 Ya 29 Agar Sall Kabiseh Bashad In Mah 29 Roz Mibashad—————— –
Mmonth_a(2) = 28
Mmonth_a(3) = 31
Mmonth_a(4) = 30
Mmonth_a(5) = 31
Mmonth_a(6) = 30
Mmonth_a(7) = 31
Mmonth_a(8) = 31
Mmonth_a(9) = 30
Mmonth_a(10) = 31
Mmonth_a(11) = 30
Mmonth_a(12) = 31
Gnumdayofyear = 365
Myear = 2008 'sample Miladi(gregorian) Year
Mday = 28 'sample Miladi Day
Mmonth = 8
Mdayofyear = 0 'sample Miladi Month
'————–shart Kabiseh Bodane Sall———— -
Temp1 = Myear Mod 4
Temp2 = Myear Mod 100
Temp3 = Myear Mod 400
Temp4 = Temp1 And Temp2
If Temp4 <> 0 Or Temp3 = 0 Then
Mmonth_a(2) = 28
Else
Mmonth_a(2) = 29
End If
Myear_ = Myear - 1
Temp1 = Myear_ Mod 4
Temp2 = Myear_ Mod 100
Temp3 = Myear_ Mod 400
Temp4 = Temp1 And Temp2
If Temp4 <> 0 Or Temp3 = 0 Then
Reset Isleapyearp
Else
Set Isleapyearp
End If
Temp1 = Mmonth - 1
For Iloop = 1 To Temp1
Mdayofyear = Mmonth_a(iloop) + Mdayofyear
Next
Mdayofyear = Mday + Mdayofyear
If Mdayofyear > 79 Then
Temp1 = Mdayofyear - 79
Jyear = Myear - 621
If Temp1 < 186 Then
Temp2 = Temp1 Mod 31
Temp3 = Temp1 / 31
If Temp2 = 0 Then
Jmonth = Temp3
Jday = 31
Else
Jmonth = Temp3 + 1
Jday = Temp2
End If
Else
Temp2 = Temp1 - 186
Temp3 = Temp2 Mod 30
Temp4 = Temp2 / 30
If Temp3 = 0 Then
Jmonth = Temp4 + 6
Jday = 30
Else
Jmonth = Temp4 + 7
Jday = Temp3
End If
End If
Else
Jyear = Myear - 622
If Isleapyearp = 1 Then
Mdayofyear = Mdayofyear + 11
Else
Mdayofyear = Mdayofyear + 10
End If
Temp2 = Mdayofyear Mod 30
Temp3 = Mdayofyear / 30
If Temp2 = 0 Then
Jmonth = Temp3 + 9
Jday = 30
Else
Jmonth = Temp3 + 10
Jday = Temp2
End If
Waitms 1
End If
[/code]
[move]لطفا راهنمایی فرمایید[/move]
دیدگاه