MATLAB: Convert date to julian date using a reference date BC.

bcdatesMATLAB

I am trying to analyse some french oceanographic data that for some unexplainable reason uses a BC reference date. All the typical matlab functions I use to convert gregorian dates to julian assume the reference date is AD. Can anyone suggest a way to convert a BC gregorian date to a datenumber? Specifically 01 Jan 4713 BC.
Many thanks.
Serena

Best Answer

juliandate() applied to a datetime object gives that system. Conversion back is
datetime(X, 'convertfrom', 'juliandate')