Refactors calendar configuration and DI container setup
Removes singleton export for CalendarConfig Updates dependency injection to use type registration Adds more flexible renderer and service configuration Integrates CalendarConfig with DateService initialization
This commit is contained in:
parent
10cb3792f4
commit
fb48e410ea
3 changed files with 18 additions and 25 deletions
|
|
@ -29,12 +29,13 @@ import {
|
|||
fromZonedTime,
|
||||
formatInTimeZone
|
||||
} from 'date-fns-tz';
|
||||
import { CalendarConfig } from '../core/CalendarConfig';
|
||||
|
||||
export class DateService {
|
||||
private timezone: string;
|
||||
|
||||
constructor(timezone: string = 'Europe/Copenhagen') {
|
||||
this.timezone = timezone;
|
||||
constructor(config: CalendarConfig) {
|
||||
this.timezone = config.getTimezone();
|
||||
}
|
||||
|
||||
// ============================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue