@lspriv/wc-plugin-ics
Version:
小程序日历组件订阅插件
53 lines (52 loc) • 1.57 kB
TypeScript
/**
* Creates a new UtcOffset instance from the passed string.
*/
export declare const fromString: (str: any) => UtcOffset;
export declare const fromSeconds: (seconds: number) => UtcOffset;
interface UtcOffsetOptions {
hours?: number;
minutes?: number;
factor?: number;
}
export declare class UtcOffset {
/** The hours in the utc-offset */
hours: number;
/** The minutes in the utc-offset */
minutes: number;
/** The sign of the utc offset, 1 for positive offset, -1 for negative */
factor: number;
/** The type name, to be used in the jCal object. */
icaltype: "utc-offset";
constructor(options?: UtcOffsetOptions);
/**
* Sets up the current instance using members from the passed data object.
*/
fromData(options?: UtcOffsetOptions): void;
normalize(): void;
/**
* Convert the current offset to a value in seconds
*/
toSeconds(): number;
/**
* Sets up the current instance from the given seconds value. The seconds
* value is truncated to the minute. Offsets are wrapped when the world
* ends, the hour after UTC+14:00 is UTC-12:00.
*/
fromSeconds(seconds: number): this;
/**
* Compare this utc offset with another one.
*/
compare(other: UtcOffset): number;
/**
* Returns a clone of the utc offset object.
*/
clone(): UtcOffset;
/**
* The iCalendar string representation of this utc-offset.
*/
/**
* The string representation of this utc-offset.
*/
toString(): string;
}
export {};