@lspriv/wc-plugin-ics
Version:
小程序日历组件订阅插件
40 lines (39 loc) • 1.14 kB
TypeScript
export interface ICalDurationDict {
weeks?: number;
days?: number;
hours?: number;
minutes?: number;
seconds?: number;
isNegative?: boolean;
}
/**
* This class represents the "duration" value type, with various calculation
* and manipulation methods.
*/
export declare class ICalDuration {
weeks: number;
days: number;
hours: number;
minutes: number;
seconds: number;
isNegative: boolean;
icalclass: string;
icaltype: string;
constructor(data?: ICalDurationDict);
/**
* Sets up the current instance using members from the passed data object.Sets up the current instance using members from the passed data object.
* @param data
*/
fromData(data?: ICalDurationDict): void;
/**
* The duration value expressed as a number of seconds.
*/
toSeconds(): number;
/** The string representation of this duration. */
toString(): string;
}
export declare const fromString: (str: string) => ICalDuration;
/**
* Checks if the given string is an iCalendar duration value.
*/
export declare const isValueString: (str: string) => boolean;