'Convert a Gregorian date into a Julian day number (matching
jQuery calendars algorithm)
@param year: the year number
@param month: the month number
@param day: the day number'

@staticmethod
def _gregorian_to_jd(year, month, day):

    if (year < 0):
        year = (year + 1)
    if (month < 3):
        month = (month + 12)
        year = (year - 1)
    a = math.floor((year / 100))
    b = ((2 - a) + math.floor((a / 4)))
    return ((((math.floor((365.25 * (year + 4716))) + math.floor((30.6001 * (month + 1)))) + day) + b) - 1524.5)
