' Get sunriseset for a given date.
' year - set YEAR calendar field.
' month - set MONTH calendar field. Month value 0-based. e.g., 0 For January.
' date - set DAY_OF_MONTH calendar field.
'Example for 23-Jun-2018<code>
'CalculateSunRiseSetForDate(2018,5,23)
'</code>
Sub CalculateSunRiseSetForDate(year As Int, month As Int, day As Int) 'ignore
' Location object with given LAT/LON
Private joLoc As JavaObject
joLoc.InitializeNewInstance("com.luckycatlabs.sunrisesunset.dto.Location", Array(LAT, LON))
' Sunsetrise object using location and timezone
Private joSRS As JavaObject
joSRS.InitializeNewInstance("com.luckycatlabs.sunrisesunset.SunriseSunsetCalculator", Array(joLoc, TZ))
' Calender object with actual date - use method set(int year, int month, int date) for other date
Private joCal As JavaObject
joCal.InitializeStatic("java.util.Calendar")
Private joCalI As JavaObject = joCal.RunMethod("getInstance", Null)
joCalI.RunMethod("set", Array(year,month,day))
' Sunrise & Sunset
Log(joSRS.RunMethod("getOfficialSunriseForDate", Array(joCalI)))
Log(joSRS.RunMethod("getOfficialSunsetForDate", Array(joCalI)))
End Sub