UNPKG

@lspriv/wc-plugin-ics

Version:

小程序日历组件订阅插件

66 lines (65 loc) 2.15 kB
import { ICalTimezone } from './timezone'; import { type ICalProperty } from './property'; interface ICalTimeDate { year?: number; month?: number; day?: number; hour?: number; minute?: number; second?: number; isDate?: boolean; timezone?: string; icaltype?: string; zone?: ICalTimezone; } export type WeekDay = 1 | 2 | 3 | 4 | 5 | 6 | 7; export declare const ICAL_TIME_SUNDAY = 1; export declare const ICAL_TIME_MONDAY = 2; export declare const ICAL_TIME_TUESDAY = 3; export declare const ICAL_TIME_WEDNESDAY = 4; export declare const ICAL_TIME_THURSDAY = 5; export declare const ICAL_TIME_FRIDAY = 6; export declare const ICAL_TIME_SATURDAY = 7; export declare const DEFAULT_WEEK_START = 2; export declare class ICalTime { private time; private year?; private month?; private day?; private hour?; private minute?; private second?; private isDate?; private zone?; private cachedUnixTime?; constructor(date: ICalTimeDate, zone?: ICalTimezone); /** * Sets up the current instance using members from the passed data object. */ fromData(date?: ICalTimeDate, zone?: ICalTimezone): this; /** * The string representation of this date/time, in jCal form * (including : and - separators). */ toString(): string; } /** * Returns a new ICAL.Time instance from a date-time string, e.g * 2015-01-02T03:04:05. If a property is specified, the timezone is set up * from the property's TZID parameter. * @param value The string to create from * @param prop The property the date belongs to */ export declare const fromDateTimeString: (value: string, prop?: ICalProperty) => ICalTime; /** * Returns a new ICAL.Time instance from a date string, e.g 2015-01-02. * @param value The string to create from */ export declare const fromDateString: (value: string) => ICalTime; /** * Returns a new ICAL.Time instance from a date or date-time string, * @param value The string to create from * @param prop The property the date belongs to */ export declare const fromString: (value: string, prop?: ICalProperty) => ICalTime; export {};