Skip to content

Commit

Permalink
feat: Use DateInterval to represent date intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstenson committed Oct 4, 2019
1 parent f869d6b commit 5b74e30
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"date-fns": "^2.4.1",
"datetime-types": "^0.2.0",
"datetime-types": "^0.3.0",
"fast-clone": "^1.5.13",
"fast-deep-equal": "^3.0.0-beta.2",
"numeric-types": "^0.3.1",
Expand Down
6 changes: 3 additions & 3 deletions src/time/date-intervals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { IntervalData } from './IntervalData';
import { DateTimeData } from './DateTimeData';
import { IntervalEdge } from './IntervalEdge';
import { TimeRelationship } from './TimeRelationship';
import { Interval, LocalDate } from 'datetime-types';
import { DateInterval } from 'datetime-types';

/**
* Create an interval that matches dates in the past.
Expand Down Expand Up @@ -48,7 +48,7 @@ function applyRelationAndEdge(r: DateTimeData, edge: IntervalEdge) {
return r;
}

export function mapDateInterval(r: IntervalData, e: DateTimeEncounter): Interval<LocalDate> {
export function mapDateInterval(r: IntervalData, e: DateTimeEncounter): DateInterval {
let start = null;
let end = null;

Expand Down Expand Up @@ -78,5 +78,5 @@ export function mapDateInterval(r: IntervalData, e: DateTimeEncounter): Interval
}
}

return Interval.between(start, end);
return DateInterval.between(start, end);
}

0 comments on commit 5b74e30

Please sign in to comment.