How to calculate Julian date?

Julian date is a continuous count of days since noon on January 1, 4713 BC in the proleptic Julian calendar.