home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************/
- /* *** dow.c *** */
- /* */
- /* This function returns the numerical day-of-week of a julian */
- /* date, input as an unsigned long integer. */
- /* */
- /* The return value of the function is the day of the week expressed */
- /* as an unsigned integer value, and is enumerated as follows: */
- /* */
- /* Sunday - 0 */
- /* Monday - 1 Thursday - 4 */
- /* Tuesday - 2 Friday - 5 */
- /* Wednesday - 3 Saturday - 6 */
- /* */
- /************************************************************************/
-
- int dow( julian )
-
- long julian;
-
- {
- return( (int)( ( julian + 5 ) % 7 ) );
- }