Comments (5)
Do you have an example to share?
from recurrencecalculator.
StartDate=12/31/2019
DayOfMonth=31
interval=1
Occurrences=10
MonthOfYear=12
RecurrenceType=YearInstance
Tuesday=true
It generates dates by starting next year.
I think the problem causes due to startdate and creationdate equals. when I set startdate as one day ago then there is no problem.
If creation time of day older than event time of day for the same date I agree it should not show. But if event time of day older than creation time of day it should show the start date as next occurrence.
from recurrencecalculator.
I do not see the behavior you describe.
Here is my test and it passes. Could you provide similar test that fails to assist?
Thank you,
[TestMethod]
public void Should_Generate_Yearly_Recurrences_With_End_Date_Same_Start_Date()
{
var recurrence = new AppointmentRecurrence
{
RecurrenceType = RecurrenceType.Yearly,
Interval = 1,
DayOfMonth = 31,
MonthOfYear = 12,
Sunday = true,
Monday = true,
Tuesday = true,
Wednesday = true,
Thursday = true,
Friday = true,
Saturday = true,
StartDate = new DateTime(2019, 12, 31),
Occurrences = 3
};
var occurrences = _calendarUtility.CalculateOccurrences(recurrence).ToList();
Assert.AreEqual(3, occurrences.Count, "Should create 3 occurrences");
Assert.AreEqual(new DateTime(2019, 12, 31), occurrences[0], "Date 1 should be correct");
Assert.AreEqual(new DateTime(2020, 12, 31), occurrences[1], "Date 2 should be correct");
Assert.AreEqual(new DateTime(2021, 12, 31), occurrences[2], "Date 3 should be correct");
}
from recurrencecalculator.
Fixed in this PR: #4.
The issue is that yearly recurrence looks at time of the start date instead of just date, like other recurrences.
from recurrencecalculator.
Version 1.0.4 has been published to NuGet.
from recurrencecalculator.
Related Issues (9)
- Should_Generate_Daily_Weekday_Recurrences_With_End_Date incorrect dates HOT 5
- order of date enumeration HOT 1
- Index HOT 3
- Day property in IRecurrence interface HOT 1
- Setting Days HOT 7
- Have appointment till end of time and to certain date? HOT 10
- Configurable start of the week HOT 7
- Monthly Recurrence Calculation Issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recurrencecalculator.