Some ignored filles was missing
This commit is contained in:
parent
7db22245e2
commit
fd5ab6bc0d
268 changed files with 31970 additions and 4 deletions
45
wwwroot/js/utils/TimeFormatter.d.ts
vendored
Normal file
45
wwwroot/js/utils/TimeFormatter.d.ts
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* TimeFormatter - Centralized time formatting with timezone support
|
||||
* Now uses DateService internally for all date/time operations
|
||||
*
|
||||
* Handles conversion from UTC/Zulu time to configured timezone (default: Europe/Copenhagen)
|
||||
* Supports both 12-hour and 24-hour format configuration
|
||||
*
|
||||
* All events in the system are stored in UTC and must be converted to local timezone
|
||||
*/
|
||||
import { ITimeFormatConfig } from '../configurations/TimeFormatConfig';
|
||||
export declare class TimeFormatter {
|
||||
private static settings;
|
||||
private static dateService;
|
||||
private static getDateService;
|
||||
/**
|
||||
* Configure time formatting settings
|
||||
* Must be called before using TimeFormatter
|
||||
*/
|
||||
static configure(settings: ITimeFormatConfig): void;
|
||||
/**
|
||||
* Convert UTC date to configured timezone (internal helper)
|
||||
* @param utcDate - Date in UTC (or ISO string)
|
||||
* @returns Date object adjusted to configured timezone
|
||||
*/
|
||||
private static convertToLocalTime;
|
||||
/**
|
||||
* Format time in 24-hour format using DateService (internal helper)
|
||||
* @param date - Date to format
|
||||
* @returns Formatted time string (e.g., "09:00")
|
||||
*/
|
||||
private static format24Hour;
|
||||
/**
|
||||
* Format time according to current configuration
|
||||
* @param date - Date to format
|
||||
* @returns Formatted time string
|
||||
*/
|
||||
static formatTime(date: Date): string;
|
||||
/**
|
||||
* Format time range (start - end) using DateService
|
||||
* @param startDate - Start date
|
||||
* @param endDate - End date
|
||||
* @returns Formatted time range string (e.g., "09:00 - 10:30")
|
||||
*/
|
||||
static formatTimeRange(startDate: Date, endDate: Date): string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue