[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Function            daysleft - calculate the days left in the year

  Syntax              int daysleft(struct ddate *d);

  Prototype in        datehk.h

  Remarks             daysleft calculates how many more days are left in
                      the year. The days left will range from 0 (Dec 31)
                      to 364 (Jan 1, no leap year) or 365 (Jan 1, leap
                      year.)

                      daysleft does no error checking on passed
                      parameters.

  Return value        returns a number from 0 to 364 (no leap year) or
                      365 (leap year.)

  See also            dayofyear(), diffddate()

  Example             #include <datehk.h>

                      main()
                      {
                           struct ddate today;

                           /* set today to Nov 3, 1987 */
                           printf("%d/%d = %d days left\n", today.dmon,
                                today.dday, daysleft(&today));
                      }

  Program output      11/3 = 58 days left


See Also: dayofyear() diffddate()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson