2

I am implementing appointment booking functionality using jqxSchedule. I am creating one API using .net MVC where i need to check whether or not given date is within the range of dates with recurrence. How can i check whether given date falls within the range of dates of different appointments having different recurrence pattern. i.e Repeat every 2nd week on every Monday and Wednesday till 10 occurrence.

I have added screenshot for reference :

enter image description here

enter image description here

enter image description here

When i pass "11-Dec-2019" it should return appointments with "New Appointment" and "Appointment" When i pass "18-Dec-2019" it should return appointments with "New Appointment"

Example of recurrence pattern i have : "DTSTART=20191210T063000Z;UNTIL=99991230T183000Z;COUNT=10;FREQ=Weekly;BYDAY=MO,WE;WKST=0;INTERVAL=2"

Any help will be appreciated.

Developer
  • 141
  • 2
  • 11
  • Check out this .NET library for dealing with time - [Time Period](https://www.codeproject.com/Articles/168662/Time-Period-Library-for-NET). It has saved me multiple times when dealing with validating time ranges in the past. There is a Nuget package [here](https://www.nuget.org/packages/TimePeriodLibrary.NET/) – zgood Dec 12 '19 at 14:40
  • not sure i understand the problem. what format is are the dates in? strings, jason or datetime? if you can convert to datetime, it is easy to do calculations. But that might not be what you ask? are you storing the dates/appointments in a db and want to check if the data are stored on correct dates? – Johan Herstad Dec 13 '19 at 08:32
  • @JohanHerstad I want to check if selected date falls among all occurrence of particular appointment. I have the recurrence pattern as stated above for set of appointment occurrence. – Developer Dec 13 '19 at 11:17

0 Answers0