本文整理汇总了C#中DDay.iCal.DataTypes.Date_Time.AddSeconds方法的典型用法代码示例。如果您正苦于以下问题:C# Date_Time.AddSeconds方法的具体用法?C# Date_Time.AddSeconds怎么用?C# Date_Time.AddSeconds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DDay.iCal.DataTypes.Date_Time
的用法示例。
在下文中一共展示了Date_Time.AddSeconds方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddFrequency
public static Date_Time AddFrequency(Recur.FrequencyType frequency, Date_Time dt, int interval)
{
switch (frequency)
{
case Recur.FrequencyType.YEARLY: return dt.AddYears(interval);
case Recur.FrequencyType.MONTHLY: return dt.AddMonths(interval);
case Recur.FrequencyType.WEEKLY: return dt.AddDays(interval * 7);
case Recur.FrequencyType.DAILY: return dt.AddDays(interval);
case Recur.FrequencyType.HOURLY: return dt.AddHours(interval);
case Recur.FrequencyType.MINUTELY: return dt.AddMinutes(interval);
case Recur.FrequencyType.SECONDLY: return dt.AddSeconds(interval);
default: return dt;
}
}
示例2: GetExtraOccurrences
protected ArrayList GetExtraOccurrences(Date_Time StartDate, Date_Time AbsEndDate)
{
ArrayList DateTimes = new ArrayList();
Date_Time EndDate = new Date_Time(StartDate);
AbsEndDate = AbsEndDate.AddSeconds(-1);
IncrementDate(EndDate, 1);
EndDate = EndDate.AddSeconds(-1);
if (EndDate > AbsEndDate)
EndDate = AbsEndDate;
return CalculateChildOccurrences(StartDate, EndDate);
}
示例3: GetExtraOccurrences
protected List<Date_Time> GetExtraOccurrences(Date_Time StartDate, Date_Time AbsEndDate)
{
List<Date_Time> DateTimes = new List<Date_Time>();
Date_Time EndDate = new Date_Time(StartDate);
// FIXME: is there a reason for this?
//AbsEndDate = AbsEndDate.AddSeconds(-1);
IncrementDate(EndDate, 1);
EndDate = EndDate.AddSeconds(-1);
if (EndDate > AbsEndDate)
EndDate = AbsEndDate;
return CalculateChildOccurrences(StartDate, EndDate);
}