hi
i how can convert gregorian date to solar date?
Plug-in type of Unicode Or Functional to do this there?
thanks
Nsis gregorian date conversion to solar
10 posts
From Wikipedia:
To give you a serious answer is difficult because as usual, you have provided absolutely zero useful information. What is the name of the calendar you want to convert to? Is it natively supported by Windows? How are you storing the timestamp you wish to convert? UNIX time? FILETIME?
You have asked about dates before? FILETIME is a 64 bit number (100-nanosecond intervals since January 1, 1601 (UTC)) if that helps...
The Gregorian calendar is a solar calendarso your job is complete 🙂
To give you a serious answer is difficult because as usual, you have provided absolutely zero useful information. What is the name of the calendar you want to convert to? Is it natively supported by Windows? How are you storing the timestamp you wish to convert? UNIX time? FILETIME?
You have asked about dates before? FILETIME is a 64 bit number (100-nanosecond intervals since January 1, 1601 (UTC)) if that helps...
Originally Posted by Anders View PostFrom Wikipedia:
so your job is complete 🙂
To give you a serious answer is difficult because as usual, you have provided absolutely zero useful information. What is the name of the calendar you want to convert to? Is it natively supported by Windows? How are you storing the timestamp you wish to convert? UNIX time? FILETIME?
You have asked about dates before? FILETIME is a 64 bit number (100-nanosecond intervals since January 1, 1601 (UTC)) if that helps...
Mr anders
The Gregorian calendar is a solar calendar ?!
Today Gregorian date is: 2015/08/22 and solar date is: 1394/05/31
yes before that i asked questions about Unix,and now i want convert that gregorian date to solar...
for example i want convert 2015/08/02 to 1394/05/11 they date is equal...
this is my question: convert gregorian date to solar date
thanks
"Solar Calendar" sounds like a bad translation. You're not asking about the Islamic calendar, as 2015 = 1436, and none of their months have 31 days. What exactly do you mean by solar calendar - where is it used?
The solar = 1394Originally Posted by demiller9 View Post"Solar Calendar" sounds like a bad translation. You're not asking about the Islamic calendar, as 2015 = 1436, and none of their months have 31 days. What exactly do you mean by solar calendar - where is it used?
The lunar = 1436
Gregorian = 2015
no! 31 is no months! that is dy,in my country date format is: Year/Months/Day
i want use from convert and convert Gregorian date to solar date...
this is a example from VB6:
Private Sub Command1_Click()
Text5.Text = FarsiDate(CStr(Text4))
End Sub
Function FarsiDate(TarikhMiladi As String)
Dim DayNumber As Integer
Dim Kabiseh As Byte
Dim S As String
Dim Day, Month, Year As Integer
If TarikhMiladi = "" Then
TarikhMiladi = Format(Date$, "dd/MM/yyyy")
Else
TarikhMiladi = Format(TarikhMiladi, "dd/MM/yyyy")
End If
Day = Val(Left$(TarikhMiladi, 2))
Month = Val(Mid$(TarikhMiladi, 4, 2))
Year = Val(Mid$(TarikhMiladi, 7))
DayNumber = (Format(Date, "yyyy") - 622 Mod 1000) Mod 100
If (((Year Mod 1000) Mod 100) = DayNumber) Or _
(((Year Mod 1000) Mod 100) = DayNumber + 1) Then
Year = 1300 + ((Year Mod 1000) Mod 100)
FarsiDate = Format$(Year, "00") & "/" & Format$(Month, "00") & "/" & Format$(Day, "00")
Exit Function
End If
If Year Mod 4 = 0 Then Kabiseh = 1 Else Kabiseh = 0
Select Case Month
Case 1: DayNumber = Day
Case 2: DayNumber = 31 + Day
Case 3: DayNumber = 31 + 28 + Kabiseh + Day
Case 4: DayNumber = 31 + 28 + Kabiseh + 31 + Day
Case 5: DayNumber = 31 + 28 + Kabiseh + 31 + 30 + Day
Case 6: DayNumber = 31 + 28 + Kabiseh + 31 + 30 + 31 + Day
Case 7: DayNumber = 31 + 28 + Kabiseh + 31 + 30 + 31 + 30 + Day
Case 8: DayNumber = 31 + 28 + Kabiseh + 31 + 30 + 31 + 30 + 31 + Day
Case 9: DayNumber = 31 + 28 + Kabiseh + 31 + 30 + 31 + 30 + 31 + 31 + Day
Case 10: DayNumber = 31 + 28 + Kabiseh + 31 + 30 + 31 + 30 + 31 + 31 + 30 + Day
Case 11: DayNumber = 31 + 28 + Kabiseh + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + Day
Case 12: DayNumber = 31 + 28 + Kabiseh + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + Day
End Select
Year = Year - 622
Month = Month + 9
If DayNumber > 79 Then
DayNumber = DayNumber - (79 - Kabiseh)
Year = Year + 1
Else
DayNumber = DayNumber + (286 + Kabiseh)
End If
If Month > 12 Then Month = Month - 11
If DayNumber <= 186 Then
Month = (DayNumber \ 31) + 1
If (DayNumber Mod 31) = 0 Then Month = Month - 1
Day = (DayNumber Mod 31)
If Day = 0 Then Day = 31
Else
Month = 7 + ((DayNumber - 186) \ 30)
If Month > 12 Then Month = 12
If ((DayNumber - 186) Mod 30) = 0 Then Month = Month - 1
Day = (DayNumber - 186) Mod 30
If Day = 0 Then Day = 30
End If
FarsiDate = Format$(Year, "00") & "/" & Format$(Month, "00") & "/" & Format$(Day, "00")
End Function i have a date sample this in a variable: 2015/08/22 and i want convert that to Solar Date (Persian Calendar)...It looks to me like you already have a fair amount of conversion code there, why did you not post it before?
Have you tried translating it to NSIS?
Have you tried translating it to NSIS?
Sounds like your asking about the Solar Hijri calendar:
yes is Solar Hijri
yes i want to translate this to nsis but don't know some equal code in nsis...
yes i want to translate this to nsis but don't know some equal code in nsis...
Originally Posted by r2du-soft View Postyes is Solar Hijri
yes i want to translate this to nsis but don't know some equal code in nsis...
mr anders please convert title to: AD date conversion to Hijri
i found two dll for convert AD date conversion to Hijri but i don't know must how use thats...
is possible help me to use thats?!
thanks
Hummf. There is only one source file in that zip, and I see issues in it.
The variable Years is never initialized before it gets used in line 22, sub Get_Date.
The variable Spring_Fall is hard coded to False, thus stopping execution of the conditional block from lines 73 to 96 in function To_Hejri.
The variable Years is never initialized before it gets used in line 22, sub Get_Date.
The variable Spring_Fall is hard coded to False, thus stopping execution of the conditional block from lines 73 to 96 in function To_Hejri.