Period-supported date and time library for C # / VB.NET?

I am looking for a library that performs specified operations in time periods with support for weekdays and time of day. I started the roll on my own, but it seems like a bug-prone job, so I would like to test this solution. I do not mind spending money.

If I have a set of two time periods (this may be several)

Setup:

// [period 1]:
TimeSet.Add(1 January 2008-31 January 2008 every Tuesday 14:00-15:00) 
// [period 2]
TimeSet.AddWithOr(1 January 2008-15 January 2008 every Tuesday 13:00-14:00) 

Results:

TimeSet.ContainsTime(2 January 2008 13:45) = False
TimeSet.ContainsTime(2 January 2008 14:15) = True // [period 1]
TimeSet.ContainsTime(2 January 2008 13:15) = True // [period 2]

I also need range checking functions:

// Only Tuesday 13-15 is in range:
TimeSet.ContainsTime(24 December 2007 13:45,1 January 2008 13:00) = False
TimeSet.ContainsTime(24 December 2007 13:45,2 January 2008 12:59) = False 
TimeSet.ContainsTime(24 December 2007 13:45,2 January 2008 13:00) = True

Other more complex dialing features are a plus.

I tried searching the site, but could not find anything.

+3
source share
4 answers

, #/.NET, Quartz (a # scheduler). CronCalendar. cron - , , , .

, codeproject, AddBusinessDay, .

, , , / . Cron, Quartz , .

+1

DateTime. DateTime, . , . .

DateTime, . DateTime , DateTime - . , , DateTime ( ). , .

0
-2

Source: https://habr.com/ru/post/1717236/


All Articles