NoWeekend (theDate, Avoidance)
Rate this function: Average rating: 3.9 (10 votes) Discuss this Custom Function
Matt Wills, Virtual Vermont
http://www.virtualvermont.com/FMP/
Adjust a future date so as not to fall on a weekend
Sample Input:
| NoWeekend (Any Sat or Sun Date, Type of Avoidance) |
|
Sample Output:
| Previous Friday or following Monday Date |
|
Description:
Automatically setting a future date (such as for a sales followup in <I>N</I> days or on the first of a month) may return a date which falls on a weekend.
NoWeekend assures that doesn't happen.
Set Avoidance to "C" to return the closest weekday (if the target date falls on Saturday, the previous Friday is returned; if the target date falls on Sunday, the following Monday is returned).
If Avoidance is any other value, the following Monday will be returned.
This CF can be quite useful in conjunction with my <I><a href = "http://www.VirtualVermont.com/FMP">Holidays</a></I> solution, which projects the dates of specified holidays (Free).
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
This is my Custom Function and I want to
edit it
Discuss:Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:
|
Newest Custom Functions:
| 1. |
CountWordOccurrences ( text ; searchWord ) |
| |
(Tue, Feb 07, 11:15am) |
| 2. |
indonesian_date(date) |
| |
(Mon, Feb 06, 7:14pm) |
| 3. |
phpArrayValue ( array ; key ; pos ) |
| |
(Fri, Jan 27, 1:49pm) |
| 4. |
solfm_timeToMinutes (theTime;roundSec) |
| |
(Fri, Jan 20, 6:26am) |
| 5. |
filterLines(filterField;filterValue;Result) |
| |
(Sat, Jan 14, 2:20pm) |
| 6. |
getMaxValue ( theList ) |
| |
(Thu, Jan 12, 1:06pm) |
| 7. |
MiddleWordsIncPunct ( text ; startingWord ; numberOfWords ) |
| |
(Sat, Jan 07, 9:16am) |
| 8. |
WindowInfo |
| |
(Fri, Jan 06, 12:39pm) |
 |
|
How do I make it so a Friday is returned instead of a Monday?
Hope you can help.
Roland, London
November 25, 2010 4:41pm