Skip to content

Commit

Permalink
feat(core/calendar): add gregorian calendar module
Browse files Browse the repository at this point in the history
  • Loading branch information
trik committed Feb 5, 2020
1 parent 8f647eb commit 0c94854
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/calendars/ethiopian/calendar-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {addDays, addYears, setISODay, startOfWeek} from 'date-fns';

import {EthiopianDate} from './ethiopian-date';

@Injectable()
@Injectable({providedIn: 'root'})
export class AjfEthiopianCalendarService extends AjfCalendarService {
buildView(params: AjfCalendarParams): AjfCalendarView {
const {viewMode} = params;
Expand Down
6 changes: 5 additions & 1 deletion src/core/calendar/calendar-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ import {AjfCalendarService} from './calendar-service';
exports: [
AjfCalendarEntryLabelPipe,
],
})
export class AjfCalendarModule { }

@NgModule({
providers: [
AjfCalendarService,
],
})
export class AjfCalendarModule { }
export class AjfGregorianCalendarModule { }
2 changes: 1 addition & 1 deletion src/core/calendar/calendar-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function periodOrder(entryType: AjfCalendarPeriodType): number {
return ['day', 'week', 'month', 'year'].indexOf(entryType);
}

@Injectable()
@Injectable({providedIn: 'root'})
export class AjfCalendarService {
buildView(params: AjfCalendarParams): AjfCalendarView {
const {viewMode, viewDate} = params;
Expand Down
3 changes: 3 additions & 0 deletions tools/public_api_guard/core/calendar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,6 @@ export interface AjfCalendarView {
export declare type AjfCalendarViewMode = ('month' | 'year' | 'decade');

export declare type AjfCalendarWeekDay = ('monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday');

export declare class AjfGregorianCalendarModule {
}

0 comments on commit 0c94854

Please sign in to comment.