| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sfldate.h" long prev_weekday (long date)
Returns the date of the previous weekday, skipping from Monday to Friday.
{ long days = date to days (date); if (day of week (date) == 1) /* Monday */ days -= 3; else if (day of week (date) == 0) /* Sunday */ days -= 2; else days -= 1; /* Tuesday to Saturday */ return (days to date (days)); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |