mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-4218] - fix tomorrow date range filter (#6438)
* [ACA-4218] - fix tomorrow date range filter * revert unnecesary change * fix unit test
This commit is contained in:
@@ -94,7 +94,7 @@ describe('DateRangeFilterComponent', () => {
|
||||
it('should return correct date when any type is selected', () => {
|
||||
const expectedDate = {
|
||||
startDate: moment().endOf('day').toISOString(true),
|
||||
endDate: moment().add(1, 'days').startOf('day').toISOString(true)
|
||||
endDate: moment().add(1, 'days').endOf('day').toISOString(true)
|
||||
};
|
||||
expect(service.getDateRange(DateCloudFilterType.TOMORROW)).toEqual(expectedDate);
|
||||
});
|
||||
|
@@ -71,7 +71,7 @@ describe('Date Range Filter service', () => {
|
||||
it('should return tomorow range', () => {
|
||||
const expectedDate = {
|
||||
startDate: moment().endOf('day').toISOString(true),
|
||||
endDate: moment().add(1, 'days').startOf('day').toISOString(true)
|
||||
endDate: moment().add(1, 'days').endOf('day').toISOString(true)
|
||||
};
|
||||
expect(service.getDateRange(DateCloudFilterType.TOMORROW)).toEqual(expectedDate);
|
||||
});
|
||||
|
@@ -60,7 +60,7 @@ export class DateRangeFilterService {
|
||||
private getTomorrowDateRange(): DateRangeFilter {
|
||||
return {
|
||||
startDate: moment().endOf('day').toISOString(true),
|
||||
endDate: moment().add(1, 'days').startOf('day').toISOString(true)
|
||||
endDate: moment().add(1, 'days').endOf('day').toISOString(true)
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user