当前位置: 首页>>代码示例>>C#>>正文


C# IDateTime.GreaterThanOrEqual方法代码示例

本文整理汇总了C#中IDateTime.GreaterThanOrEqual方法的典型用法代码示例。如果您正苦于以下问题:C# IDateTime.GreaterThanOrEqual方法的具体用法?C# IDateTime.GreaterThanOrEqual怎么用?C# IDateTime.GreaterThanOrEqual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDateTime的用法示例。


在下文中一共展示了IDateTime.GreaterThanOrEqual方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IsActive

 /// <summary>
 /// Returns 'True' if the todo item is Active as of <paramref name="currDt"/>.
 /// An item is Active if it requires action of some sort.
 /// </summary>
 /// <param name="currDt">The date and time to test.</param>
 /// <returns>True if the item is Active as of <paramref name="currDt"/>, False otherwise.</returns>
 virtual public bool IsActive(IDateTime currDt)
 {
     if (DTStart == null)
         return !IsCompleted(currDt) && !IsCancelled();
     else if (currDt.GreaterThanOrEqual(DTStart))
         return !IsCompleted(currDt) && !IsCancelled();
     else return false;
 }
开发者ID:logikonline,项目名称:DDay.iCal,代码行数:14,代码来源:Todo.cs

示例2: IsCompleted

        /// <summary>
        /// Use this method to determine if a todo item has been completed.
        /// This takes into account recurrence items and the previous date
        /// of completion, if any.        
        /// <note>
        /// This method evaluates the recurrence pattern for this TODO
        /// as necessary to ensure all relevant information is taken
        /// into account to give the most accurate result possible.
        /// </note>
        /// </summary>
        /// <param name="DateTime">The date and time to test.</param>
        /// <returns>True if the todo item has been completed</returns>
        virtual public bool IsCompleted(IDateTime currDt)
        {
            if (Status == TodoStatus.Completed)
            {
                if (Completed == null ||
                    Completed.GreaterThan(currDt))
                    return true;

                // Evaluate to the previous occurrence.
                m_Evaluator.EvaluateToPreviousOccurrence(Completed, currDt);

                foreach (Period p in m_Evaluator.Periods)
                {
                    if (p.StartTime.GreaterThan(Completed) && // The item has recurred after it was completed
                        currDt.GreaterThanOrEqual(p.StartTime))     // and the current date is after or on the recurrence date.
                        return false;
                }
                return true;
            }
            return false;
        }
开发者ID:logikonline,项目名称:DDay.iCal,代码行数:33,代码来源:Todo.cs


注:本文中的IDateTime.GreaterThanOrEqual方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。