172. Another calendar function ~~~~~~~~~~~~~~~~~~~~~~~~~ This Function will calculate the Julian Day Number which starts at midday on the Gregorian date specified, eg PRINT FNjulian(25,12,1987). Keen astronomers will know the significance of the Julian Day Number, but it has a more mundane use too. It provides a very simple way of calculating the exact number of days between two dates, taking full account of all Leap Years; you simply subtract the two Julian Day Numbers. eg: PRINT FNjulian(25,12,1987)-FNjulian(28,5,1951) . One small point; 1987 had a 'Leap Second' added to it to allow for the fact the Earth's rotation has slowed very slightly. Do not throw your Quartz watches away! Note that I have split line 1010 to make it look tidier; it is actually all one continuous line. 1000 DEFFNjulian(d%,m%,y%) 1010 =367*y%-7*(y%+(m%+9)DIV12)DIV4-3*((y%+(m%-9)DIV7)DIV100+1)DIV4 +275*m%DIV9+d%+1721029