IsBusinessDay() публичный абстрактный Метод

Determines if the Date provided falls on a business day in this Calendar (e.g. not a holiday or weekend).
public abstract IsBusinessDay ( Date date ) : bool
date Date The to be tested.
Результат bool
Пример #1
0
 /// <summary>
 /// Adjusts a <see cref="Date"/> to the preceding business day if it falls
 /// on a holiday.
 /// </summary>
 /// <param name="calendar">The <see cref="Calendar"/> to be used.</param>
 /// <param name="date">The <see cref="Date"/> to adjust.</param>
 /// <returns>A (possibly) adjusted <see cref="Date"/> instance.</returns>
 private static Date Preceding(Calendar calendar, Date date)
 {
     while (!calendar.IsBusinessDay(date))
     {
         date = date.PlusDays(-1);
     }
     return(date);
 }
Пример #2
0
 /// <summary>
 /// Adjusts a <see cref="Date"/> to the next business day if it falls on
 /// a holiday.
 /// </summary>
 /// <param name="calendar">The <see cref="Calendar"/> to be used.</param>
 /// <param name="date">The <see cref="Date"/> to adjust.</param>
 /// <returns>A (possibly) adjusted <see cref="Date"/> instance.</returns>
 private static Date Following(Calendar calendar, Date date)
 {
     while (!calendar.IsBusinessDay(date))
     {
         date = date.PlusDays(+1);
     }
     return(date);
 }
Пример #3
0
 /// <summary>
 /// Adjusts a <see cref="Date"/> to the preceding business day if it falls
 /// on a holiday.
 /// </summary>
 /// <param name="calendar">The <see cref="Calendar"/> to be used.</param>
 /// <param name="date">The <see cref="Date"/> to adjust.</param>
 /// <returns>A (possibly) adjusted <see cref="Date"/> instance.</returns>
 private static Date Preceding(Calendar calendar, Date date)
 {
     while (!calendar.IsBusinessDay (date))
         date = date.PlusDays (-1);
     return (date);
 }
Пример #4
0
 /// <summary>
 /// Adjusts a <see cref="Date"/> to the next business day if it falls on
 /// a holiday.
 /// </summary>
 /// <param name="calendar">The <see cref="Calendar"/> to be used.</param>
 /// <param name="date">The <see cref="Date"/> to adjust.</param>
 /// <returns>A (possibly) adjusted <see cref="Date"/> instance.</returns>
 private static Date Following(Calendar calendar, Date date)
 {
     while (!calendar.IsBusinessDay (date))
         date = date.PlusDays (+1);
     return (date);
 }