Skip to content

Commit

Permalink
fix(formatter): date-adapter does not have methods for open range (#U…
Browse files Browse the repository at this point in the history
…IM-163) (#395)
  • Loading branch information
lskramarov authored and pimenovoleg committed Jan 24, 2020
1 parent a041495 commit 80f75f0
Show file tree
Hide file tree
Showing 6 changed files with 1,399 additions and 813 deletions.
16 changes: 16 additions & 0 deletions packages/cdk/datetime/date-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,22 @@ export abstract class DateAdapter<D> {
*/
abstract absoluteLongDate(date: Moment): string;

/**
* @param startDate - start date
* @param endDate - end date
* @param template - template
* @returns opened date
*/
abstract openedRangeDate(startDate: Moment, endDate: Moment, template: IFormatterRangeTemplate): string;

/**
* @param startDate - start date
* @param endDate - end date
* @param template - template
* @returns opened date
*/
abstract openedRangeDateTime(startDate: Moment, endDate: Moment, template: IFormatterRangeTemplate): string;

/**
* @param date - date
* @returns absolute date in long format with time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ export interface IFormatterConfig {
long: IFormatterAbsoluteTemplate;
};
rangeTemplates: {
short: IFormatterRangeTemplate;
middle: IFormatterRangeTemplate;
long: IFormatterRangeTemplate;
closedRange: {
short: IFormatterRangeTemplate;
middle: IFormatterRangeTemplate;
long: IFormatterRangeTemplate;
};
openedRange: {
short: IFormatterRangeTemplate;
long: IFormatterRangeTemplate;
};
};
}
Loading

0 comments on commit 80f75f0

Please sign in to comment.