# Julian Day Calculator with AutoIT

I know that there is a Julian Day Converter that has been around for years. It, however, is no longer supported. The window can sometimes be a little messy to resize and it is expressed by dd/mm/yyyy not mm/dd/yyyy for which I am more used to. Well, here is my attempt at a calculator using AutoIt and Koda.

This calculator is for all AD dates in the Gregorian calendar.

To use, type in the month, day, and year and press calculate. Done.

```; Sources
; http://csc.sesi-va.com/viewtopic.php?f=11&t=540
; http://scienceworld.wolfram.com/astronomy/JulianDate.html
; http://www.autoitscript.com/autoit3/docs/functions/Int.htm

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
\$Form1 = GUICreate("Julian Day Calculator", 434, 86, 231, 126)
\$Month = GUICtrlCreateInput("Month", 32, 16, 41, 21)
\$Day = GUICtrlCreateInput("Day", 80, 16, 41, 21)
\$Year = GUICtrlCreateInput("Year", 128, 16, 41, 21)
\$Julian_Day = GUICtrlCreateInput("", 280, 16, 121, 21)
\$Modified_Julian_Day = GUICtrlCreateInput("", 280, 48, 121, 21)
\$Calculate = GUICtrlCreateButton("Calculate", 32, 48, 75, 25, 0)
\$Label1 = GUICtrlCreateLabel("Julian Day", 224, 16, 53, 17)
\$Label2 = GUICtrlCreateLabel("Modified Julian Day", 184, 48, 96, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit

Case \$Calculate
Case ''
Case Else
EndSwitch

Case ''
Case Else
EndSwitch

Case ''
Case Else
EndSwitch

; For Gregorian calendar dates 1901-2099