From 4fd3531dac4824f813327226ef65a551b4a9d149 Mon Sep 17 00:00:00 2001 From: Tobias Schweizer Date: Mon, 17 Jun 2019 17:27:41 +0200 Subject: [PATCH 1/7] feature (Islamic calendar): add support for the Islamic calendar --- .../lib/jdnconvertible-calendar-date-adapter.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts b/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts index e853842..4c95ada 100644 --- a/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts +++ b/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts @@ -25,10 +25,10 @@ import { CalendarPeriod, GregorianCalendarDate, JDNConvertibleCalendar, - JDNConvertibleConversionModule, - JDNPeriod, JulianCalendarDate } from 'jdnconvertiblecalendar'; +import {JDNConvertibleCalendarModule} from "jdnconvertiblecalendar/dist/src/JDNConvertibleCalendar"; +import IslamicCalendarDate = JDNConvertibleCalendarModule.IslamicCalendarDate; @Injectable() @@ -105,6 +105,10 @@ export class JDNConvertibleCalendarDateAdapter extends DateAdapter Date: Mon, 17 Jun 2019 17:51:00 +0200 Subject: [PATCH 2/7] feature (Islamic calendar): add support for the Islamic calendar --- .../lib/jdnconvertible-calendar-date-adapter.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts b/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts index 4c95ada..eff5faf 100644 --- a/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts +++ b/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts @@ -142,8 +142,11 @@ export class JDNConvertibleCalendarDateAdapter extends DateAdapter Date: Tue, 23 Jul 2019 14:59:23 +0200 Subject: [PATCH 3/7] feature (version of jdnconvcal): use version 0.0.4 of jdnconvcal --- package.json | 2 +- .../src/lib/jdnconvertible-calendar-date-adapter.ts | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 53433cf..38484d9 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@angular/platform-browser-dynamic": "^7.2.7", "@angular/router": "^7.2.7", "core-js": "^2.5.4", - "jdnconvertiblecalendar": "0.0.3", + "jdnconvertiblecalendar": "0.0.4", "rxjs": "^6.0.0", "zone.js": "^0.8.26" }, diff --git a/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts b/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts index eff5faf..523fe2e 100644 --- a/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts +++ b/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts @@ -145,7 +145,7 @@ export class JDNConvertibleCalendarDateAdapter extends DateAdapter Date: Tue, 23 Jul 2019 15:04:20 +0200 Subject: [PATCH 4/7] test (travis): adapt version of node_js --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5017da4..f9894a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ sudo: required language: node_js node_js: - - "8" + - "10.9.0" cache: directories: From a694c6aa1db05ac6a61a8e2a7ee1d846a69da1db Mon Sep 17 00:00:00 2001 From: Tobias Schweizer Date: Wed, 24 Jul 2019 09:06:21 +0200 Subject: [PATCH 5/7] feature (Islamic calendar): add Islamic calendar to parameters --- src/app/app.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index c265461..c81c413 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -76,7 +76,7 @@ export class HeaderComponent implements OnInit { * * @param {"Gregorian" | "Julian"} calendar the target calendar format. */ - convertCalendar(calendar: 'Gregorian' | 'Julian') { + convertCalendar(calendar: 'Gregorian' | 'Julian' | 'Islamic') { if (this._dateAdapter instanceof JDNConvertibleCalendarDateAdapter) { From 10546894129fe246d3fbd26125ce3bfe37c82a87 Mon Sep 17 00:00:00 2001 From: Tobias Schweizer Date: Fri, 26 Jul 2019 09:16:57 +0200 Subject: [PATCH 6/7] feature (Islamic calendar): emit event after change --- src/app/app.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index c81c413..34b6f8f 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,6 +1,6 @@ import {Component, Host, Inject, OnInit} from '@angular/core'; import {FormBuilder, FormGroup, Validators} from '@angular/forms'; -import {DateAdapter, MatCalendar, MatDatepickerContent} from '@angular/material'; +import {DateAdapter, MatCalendar, MatDatepickerContent, MatDatepickerIntl} from '@angular/material'; import {JDNConvertibleCalendar} from 'jdnconvertiblecalendar'; import {JDNConvertibleCalendarDateAdapter} from 'jdnconvertible-calendar-date-adapter'; @@ -42,6 +42,7 @@ export class HeaderComponent implements OnInit { constructor(@Host() private _calendar: MatCalendar, private _dateAdapter: DateAdapter, private _datepickerContent: MatDatepickerContent, + private _datepickerIntl: MatDatepickerIntl, @Inject(FormBuilder) private fb: FormBuilder) { } @@ -87,6 +88,9 @@ export class HeaderComponent implements OnInit { this._datepickerContent.datepicker.select(convertedDate); this._calendar.updateTodaysDate(); + + this._datepickerIntl.changes.next(); + } } } From ca5845653fc5e88c86b53417015bbc3f31987177 Mon Sep 17 00:00:00 2001 From: Tobias Schweizer Date: Mon, 19 Aug 2019 10:09:02 +0200 Subject: [PATCH 7/7] refactor (date adapter): adapt imports --- .../src/lib/jdnconvertible-calendar-date-adapter.ts | 5 ++--- src/app/app.component.ts | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts b/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts index 523fe2e..c8bea14 100644 --- a/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts +++ b/projects/jdnconvertible-calendar-date-adapter/src/lib/jdnconvertible-calendar-date-adapter.ts @@ -25,10 +25,9 @@ import { CalendarPeriod, GregorianCalendarDate, JDNConvertibleCalendar, - JulianCalendarDate + JulianCalendarDate, + IslamicCalendarDate } from 'jdnconvertiblecalendar'; -import {JDNConvertibleCalendarModule} from "jdnconvertiblecalendar/dist/src/JDNConvertibleCalendar"; -import IslamicCalendarDate = JDNConvertibleCalendarModule.IslamicCalendarDate; @Injectable() diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 34b6f8f..c26fe46 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -42,7 +42,6 @@ export class HeaderComponent implements OnInit { constructor(@Host() private _calendar: MatCalendar, private _dateAdapter: DateAdapter, private _datepickerContent: MatDatepickerContent, - private _datepickerIntl: MatDatepickerIntl, @Inject(FormBuilder) private fb: FormBuilder) { } @@ -89,8 +88,6 @@ export class HeaderComponent implements OnInit { this._calendar.updateTodaysDate(); - this._datepickerIntl.changes.next(); - } } }