Convert a Julian date to Gregorian (and a Gregorian date to Julian)

Convert a Julian (Old Style) calendar date to a Gregorian date, or the other way round, with the gap in days, the weekday and the Julian Day Number.