diff -ur NOVAS_Py-3.1.orig/compat/compat.py NOVAS_Py-3.1/compat/compat.py
--- compat/compat.py.orig	2011-06-30 05:00:54.000000000 -0700
+++ compat/compat.py	2011-08-26 09:31:45.000000000 -0700
@@ -3057,7 +3057,7 @@
     limb_ang = c_double()
     nadir_ang = c_double()
 
-    _limb_angle = ((c_double*3)(*pos_obj), (c_double*3)(*pos_obs),
+    _limb_angle ((c_double*3)(*pos_obj), (c_double*3)(*pos_obs),
                    byref(limb_ang), byref(nadir_ang))
 
     return limb_ang.value, nadir_ang.value
@@ -3160,7 +3160,7 @@
 
     return jd
 
-def cal_date(day):
+def cal_date(jd):
     """
     Return the Gregorian date for a given Julian day.
     
@@ -3184,7 +3184,7 @@
     
     """
 
-    if day < 0.0: raise ValueError(_neg_err % {'name': 'day'})
+    if jd < 0.0: raise ValueError(_neg_err % {'name': 'jd'})
 
     _cal_date = novaslib.cal_date
     _cal_date.argtypes = (c_double, POINTER(c_short), POINTER(c_short),
@@ -3196,7 +3196,7 @@
     day = c_short()
     hour = c_double()
 
-    _cal_date(day, byref(year), byref(month), byref(day), byref(hour))
+    _cal_date(jd, byref(year), byref(month), byref(day), byref(hour))
 
     return year.value, month.value, day.value, hour.value
 
