NavList:
A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding
From: Frank Reed
Date: 2016 Feb 23, 10:22 -0800
Yes, something is wrong. Umland's code has been skunked by the evolution of javascript. It's an example of a "legacy code" problem --or less generously, it was built wrong in the first place. He defined a mathematical function in his code named "trunc" which has in recent years become the name of a standard javascript math function. This means that Umland's code is over-ruled by the built-in function which does something entirely different. This can easily be fixed by changing the name of Umland's function to something less obvious like "inRange360" which also more aptly describes the purpose of that function. I am attaching a copy of this code, modified in this way. You can run it right here on the NavList message boards, or you can download the file and place it on your computer desktop and run it anytime, even when you have no Internet connection. Another way to achieve the same thing, and to confirm the proper behavior, is to visit that original web page in Internet Explorer, or any browser which does not yet employ the most recent standards for javascript (Microsoft's IE tends to be much more conservative since they target business users who often have legacy code like this).
You could also try my online Nautical Almanac data tool.
Frank Reed