-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventCalendar.cs
More file actions
23 lines (22 loc) · 784 Bytes
/
EventCalendar.cs
File metadata and controls
23 lines (22 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Collections.Generic;
namespace gbelenky.EventPub
{
public class EventCalendar
{
public string Name { get; set; }
public DateTimeOffset StartTime { get; set; }
public int NextDay { get; set; } = 0;
public int NextHour { get; set; } = 0;
public int NextMinute { get; set; } = 0;
public int NextSecond { get; set; } = 0;
public void SetNextStartTime()
{
DateTimeOffset nextStartTime = StartTime.AddDays(NextDay);
nextStartTime = StartTime.AddHours(NextHour);
nextStartTime = StartTime.AddMinutes(NextMinute);
nextStartTime = StartTime.AddSeconds(NextSecond);
StartTime = nextStartTime;
}
}
}