I have an application that converts dates between the two calendars in VB like this:

VB Code:
  1. Dim dt as Date
  2.  
  3. dt = Date
  4.  
  5. Calendar = vbCalGreg
  6.  
  7. Msgbox dt
  8.  
  9. Calendar = vbCalHijri
  10.  
  11. Msgbox dt

This works fine, however the hijri calendar is not fixed like the gregorian calendar depending on moon sightings.

What I would like to do is find a way to offset the result returned by windows for the hijri calendar through either api calls or a setting in the registry.

Using Dateadd function is not a solution as the application uses the results in constructing a calendar. The solution must involve either api call or setting in the registry.

Any help would be appreciated. Thank you in advance.