Skip to content

TEInterval minute logic #1

@wadebee

Description

@wadebee

I think perhaps the TEInterval.Includes logic is incorrect. Take for example the following tests from some preliminary testing I ran.

TEInterval tim = new TEInterval(new DateTime(2013, 7, 24, 11, 30, 0), 25, IntervalPrecision.Minutes);
Assert.IsFalse(tim.Includes(new DateTime(2013, 7, 24, 12, 30, 0)));
Assert.IsTrue(tim.Includes(new DateTime(2013, 7, 24, 12, 45, 0)));

In TEInterval.cs line 49 did you intend for the logic to look more like this?
return ((ts.TotalMinutes % this.Interval) == 0);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions