@lspriv/wc-plugin-ics
Version:
小程序日历组件订阅插件
48 lines (47 loc) • 1.69 kB
TypeScript
import { ICalComponent } from './component';
interface TimezoneOptions {
/** can be set to either a string containing the component data, or an already parsed ICAL.Component */
component?: string | ICalComponent;
/** The timezone identifier */
tzid?: string;
/** An alternative string representation of the timezone */
tznames?: string;
/** The timezone location */
location?: string;
/** The latitude of the timezone */
latitude?: number;
/** The longitude of the timezone */
longitude?: number;
}
/**
* Creates a new ICAL.Timezone instance from the passed data object.
*/
export declare const fromData: (date: TimezoneOptions) => ICalTimezone;
/**
* Timezone representation, created by passing in a tzid and component.
*/
export declare class ICalTimezone {
expandedUntilYear: number;
component: ICalComponent | null;
changes: any[];
tzid: string;
constructor(data?: ICalComponent | TimezoneOptions);
/** Sets up the current instance using members from the passed data object. */
fromData(data?: ICalComponent | TimezoneOptions): this;
}
/**
* Singleton class to contain timezones. Right now it is all manual registry in
* the future we may use this class to download timezone information or handle
* loading pre-expanded timezones.
*/
export declare class ICalTimezoneService {
static zones: Array<ICalTimezone>;
/**
* Returns a timezone by its tzid if present.
* @param tzid Timezone identifier (e.g. America/Los_Angeles)
*/
static getZone(tzid: string): any;
}
export declare const localTimezone: ICalTimezone;
export declare const utcTimezone: ICalTimezone;
export {};