rrule-rust 2.0.2-next.1 → 2.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/lib/browser.d.ts +1 -0
- package/dist/browser/lib/browser.js +1 -0
- package/dist/{lib → browser/lib}/index.d.ts +46 -45
- package/dist/browser/lib/index.js +369 -0
- package/dist/browser/lib/rrule-rust.wasi-browser.d.ts +6 -0
- package/dist/browser/lib/rrule-rust.wasi-browser.js +70 -0
- package/dist/browser/lib/rrule-rust.wasi.cjs +101 -0
- package/dist/browser/lib/rrule-rust.wasi.d.cts +1 -0
- package/dist/browser/lib/wasi-worker-browser.d.mts +1 -0
- package/dist/browser/lib/wasi-worker-browser.mjs +32 -0
- package/dist/browser/lib/wasi-worker.d.mts +1 -0
- package/dist/browser/lib/wasi-worker.mjs +63 -0
- package/dist/{rrule-set.js → browser/rrule-set.js} +4 -4
- package/dist/{rrule.js → browser/rrule.js} +3 -3
- package/dist/node/datetime.d.ts +55 -0
- package/dist/node/datetime.js +124 -0
- package/dist/node/index.d.ts +3 -0
- package/dist/node/index.js +19 -0
- package/dist/node/lib/browser.d.ts +1 -0
- package/dist/node/lib/browser.js +1 -0
- package/dist/node/lib/index.d.ts +82 -0
- package/dist/node/lib/index.js +369 -0
- package/dist/node/lib/rrule-rust.wasi-browser.d.ts +6 -0
- package/dist/node/lib/rrule-rust.wasi-browser.js +70 -0
- package/dist/node/lib/rrule-rust.wasi.cjs +101 -0
- package/dist/node/lib/rrule-rust.wasi.d.cts +1 -0
- package/dist/node/lib/wasi-worker-browser.d.mts +1 -0
- package/dist/node/lib/wasi-worker-browser.mjs +32 -0
- package/dist/node/lib/wasi-worker.d.mts +1 -0
- package/dist/node/lib/wasi-worker.mjs +63 -0
- package/dist/node/rrule-set.d.ts +68 -0
- package/dist/node/rrule-set.js +191 -0
- package/dist/node/rrule.d.ts +97 -0
- package/dist/node/rrule.js +175 -0
- package/package.json +56 -50
- package/dist/lib/index.js +0 -321
- /package/dist/{datetime.d.ts → browser/datetime.d.ts} +0 -0
- /package/dist/{datetime.js → browser/datetime.js} +0 -0
- /package/dist/{index.d.ts → browser/index.d.ts} +0 -0
- /package/dist/{index.js → browser/index.js} +0 -0
- /package/dist/{rrule-set.d.ts → browser/rrule-set.d.ts} +0 -0
- /package/dist/{rrule.d.ts → browser/rrule.d.ts} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'
|
|
2
|
+
|
|
3
|
+
const handler = new MessageHandler({
|
|
4
|
+
onLoad({ wasmModule, wasmMemory }) {
|
|
5
|
+
const wasi = new WASI({
|
|
6
|
+
print: function () {
|
|
7
|
+
// eslint-disable-next-line no-console
|
|
8
|
+
console.log.apply(console, arguments)
|
|
9
|
+
},
|
|
10
|
+
printErr: function() {
|
|
11
|
+
// eslint-disable-next-line no-console
|
|
12
|
+
console.error.apply(console, arguments)
|
|
13
|
+
},
|
|
14
|
+
})
|
|
15
|
+
return instantiateNapiModuleSync(wasmModule, {
|
|
16
|
+
childThread: true,
|
|
17
|
+
wasi,
|
|
18
|
+
overwriteImports(importObject) {
|
|
19
|
+
importObject.env = {
|
|
20
|
+
...importObject.env,
|
|
21
|
+
...importObject.napi,
|
|
22
|
+
...importObject.emnapi,
|
|
23
|
+
memory: wasmMemory,
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
},
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
globalThis.onmessage = function (e) {
|
|
31
|
+
handler.handle(e)
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { parse } from "node:path";
|
|
4
|
+
import { WASI } from "node:wasi";
|
|
5
|
+
import { parentPort, Worker } from "node:worker_threads";
|
|
6
|
+
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
const { instantiateNapiModuleSync, MessageHandler, getDefaultContext } = require("@napi-rs/wasm-runtime");
|
|
10
|
+
|
|
11
|
+
if (parentPort) {
|
|
12
|
+
parentPort.on("message", (data) => {
|
|
13
|
+
globalThis.onmessage({ data });
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
Object.assign(globalThis, {
|
|
18
|
+
self: globalThis,
|
|
19
|
+
require,
|
|
20
|
+
Worker,
|
|
21
|
+
importScripts: function (f) {
|
|
22
|
+
;(0, eval)(fs.readFileSync(f, "utf8") + "//# sourceURL=" + f);
|
|
23
|
+
},
|
|
24
|
+
postMessage: function (msg) {
|
|
25
|
+
if (parentPort) {
|
|
26
|
+
parentPort.postMessage(msg);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const emnapiContext = getDefaultContext();
|
|
32
|
+
|
|
33
|
+
const __rootDir = parse(process.cwd()).root;
|
|
34
|
+
|
|
35
|
+
const handler = new MessageHandler({
|
|
36
|
+
onLoad({ wasmModule, wasmMemory }) {
|
|
37
|
+
const wasi = new WASI({
|
|
38
|
+
version: 'preview1',
|
|
39
|
+
env: process.env,
|
|
40
|
+
preopens: {
|
|
41
|
+
[__rootDir]: __rootDir,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return instantiateNapiModuleSync(wasmModule, {
|
|
46
|
+
childThread: true,
|
|
47
|
+
wasi,
|
|
48
|
+
context: emnapiContext,
|
|
49
|
+
overwriteImports(importObject) {
|
|
50
|
+
importObject.env = {
|
|
51
|
+
...importObject.env,
|
|
52
|
+
...importObject.napi,
|
|
53
|
+
...importObject.emnapi,
|
|
54
|
+
memory: wasmMemory
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
globalThis.onmessage = function (e) {
|
|
62
|
+
handler.handle(e);
|
|
63
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RRuleSet = void 0;
|
|
4
4
|
const rrule_1 = require("./rrule");
|
|
5
|
-
const
|
|
5
|
+
const _lib_1 = require("@rrule-rust/lib-wasm32-wasi");
|
|
6
6
|
const datetime_1 = require("./datetime");
|
|
7
7
|
class RRuleSet {
|
|
8
8
|
constructor(setOrDtstart, tzid) {
|
|
@@ -36,7 +36,7 @@ class RRuleSet {
|
|
|
36
36
|
* Parses a string into an RRuleSet.
|
|
37
37
|
*/
|
|
38
38
|
static parse(str) {
|
|
39
|
-
const rust =
|
|
39
|
+
const rust = _lib_1.RRuleSet.parse(str);
|
|
40
40
|
return this.fromRust(rust);
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
@@ -149,7 +149,7 @@ class RRuleSet {
|
|
|
149
149
|
*/
|
|
150
150
|
toRust() {
|
|
151
151
|
if (!this.rust) {
|
|
152
|
-
this.rust = new
|
|
152
|
+
this.rust = new _lib_1.RRuleSet(this.dtstart.toNumeric(), this.tzid, this.rrules.map((rrule) => rrule.toRust()), this.exrules.map((rrule) => rrule.toRust()), this.exdates.map((datetime) => datetime.toNumeric()), this.rdates.map((datetime) => datetime.toNumeric()));
|
|
153
153
|
}
|
|
154
154
|
return this.rust;
|
|
155
155
|
}
|
|
@@ -170,7 +170,7 @@ class RRuleSet {
|
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
[Symbol.iterator]() {
|
|
173
|
-
const iter = this.toRust().iterator()
|
|
173
|
+
const iter = this.toRust().iterator();
|
|
174
174
|
return {
|
|
175
175
|
next: () => {
|
|
176
176
|
const result = iter.next();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RRule = exports.Weekday = exports.Month = exports.Frequency = void 0;
|
|
4
4
|
const datetime_1 = require("./datetime");
|
|
5
|
-
const
|
|
5
|
+
const _lib_1 = require("@rrule-rust/lib-wasm32-wasi");
|
|
6
6
|
var Frequency;
|
|
7
7
|
(function (Frequency) {
|
|
8
8
|
Frequency[Frequency["Yearly"] = 0] = "Yearly";
|
|
@@ -73,7 +73,7 @@ class RRule {
|
|
|
73
73
|
* Parses a string into an RRule.
|
|
74
74
|
*/
|
|
75
75
|
static parse(str) {
|
|
76
|
-
const rust =
|
|
76
|
+
const rust = _lib_1.RRule.parse(str);
|
|
77
77
|
return this.fromRust(rust);
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
@@ -149,7 +149,7 @@ class RRule {
|
|
|
149
149
|
*/
|
|
150
150
|
toRust() {
|
|
151
151
|
if (!this.rust) {
|
|
152
|
-
this.rust = new
|
|
152
|
+
this.rust = new _lib_1.RRule(this.frequency, this.interval, this.count, this.weekstart, this.until?.toNumeric(), this.byWeekday, this.byHour, this.byMinute, this.bySecond, this.byMonthday, this.bySetpos, this.byMonth, this.byWeekno, this.byYearday);
|
|
153
153
|
}
|
|
154
154
|
return this.rust;
|
|
155
155
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface DateTimeLike {
|
|
2
|
+
readonly year: number;
|
|
3
|
+
readonly month: number;
|
|
4
|
+
readonly day: number;
|
|
5
|
+
readonly hour: number;
|
|
6
|
+
readonly minute: number;
|
|
7
|
+
readonly second: number;
|
|
8
|
+
}
|
|
9
|
+
export interface FromObjectOptions {
|
|
10
|
+
utc?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Represents a date and time. Either local or UTC.
|
|
14
|
+
*/
|
|
15
|
+
export declare class DateTime implements DateTimeLike {
|
|
16
|
+
private readonly numeric;
|
|
17
|
+
private constructor();
|
|
18
|
+
get year(): number;
|
|
19
|
+
get month(): number;
|
|
20
|
+
get day(): number;
|
|
21
|
+
get hour(): number;
|
|
22
|
+
get minute(): number;
|
|
23
|
+
get second(): number;
|
|
24
|
+
get utc(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new DateTime object from the given date and time components.
|
|
27
|
+
*/
|
|
28
|
+
static create(year: number, month: number, day: number, hour: number, minute: number, second: number, utc: boolean): DateTime;
|
|
29
|
+
/**
|
|
30
|
+
* This method is shorthand for `DateTime.create` with `utc` set to `false`.
|
|
31
|
+
*/
|
|
32
|
+
static local(year: number, month: number, day: number, hour: number, minute: number, second: number): DateTime;
|
|
33
|
+
/**
|
|
34
|
+
* This method is shorthand for `DateTime.create` with `utc` set to `true`.
|
|
35
|
+
*/
|
|
36
|
+
static utc(year: number, month: number, day: number, hour: number, minute: number, second: number): DateTime;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new DateTime object from the given plain object.
|
|
39
|
+
*/
|
|
40
|
+
static fromObject(object: DateTimeLike, options?: FromObjectOptions): DateTime;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a new DateTime object from provided string representation of a date according to RFC 5545.
|
|
43
|
+
*/
|
|
44
|
+
static fromString(str: string): DateTime;
|
|
45
|
+
/**
|
|
46
|
+
* Converts DateTime into a plain object.
|
|
47
|
+
*/
|
|
48
|
+
toObject(): DateTimeLike;
|
|
49
|
+
/**
|
|
50
|
+
* Converts DateTime into ISO 8601 string:
|
|
51
|
+
* - `YYYYMMDDTHHMMSSZ` for UTC
|
|
52
|
+
* - `YYYYMMDDTHHMMSS` for local
|
|
53
|
+
*/
|
|
54
|
+
toString(): string;
|
|
55
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateTime = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Represents a date and time. Either local or UTC.
|
|
6
|
+
*/
|
|
7
|
+
class DateTime {
|
|
8
|
+
constructor(numeric) {
|
|
9
|
+
this.numeric = numeric;
|
|
10
|
+
}
|
|
11
|
+
get year() {
|
|
12
|
+
return Math.floor(this.numeric / 100000000000);
|
|
13
|
+
}
|
|
14
|
+
get month() {
|
|
15
|
+
return Math.floor((this.numeric / 1000000000) % 100);
|
|
16
|
+
}
|
|
17
|
+
get day() {
|
|
18
|
+
return Math.floor((this.numeric / 10000000) % 100);
|
|
19
|
+
}
|
|
20
|
+
get hour() {
|
|
21
|
+
return Math.floor((this.numeric / 100000) % 100);
|
|
22
|
+
}
|
|
23
|
+
get minute() {
|
|
24
|
+
return Math.floor((this.numeric / 1000) % 100);
|
|
25
|
+
}
|
|
26
|
+
get second() {
|
|
27
|
+
return Math.floor((this.numeric / 10) % 100);
|
|
28
|
+
}
|
|
29
|
+
get utc() {
|
|
30
|
+
return this.numeric % 10 == 1;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Creates a new DateTime object from the given date and time components.
|
|
34
|
+
*/
|
|
35
|
+
static create(year, month, day, hour, minute, second, utc) {
|
|
36
|
+
const numeric = year * 100000000000 +
|
|
37
|
+
month * 1000000000 +
|
|
38
|
+
day * 10000000 +
|
|
39
|
+
hour * 100000 +
|
|
40
|
+
minute * 1000 +
|
|
41
|
+
second * 10 +
|
|
42
|
+
(utc ? 1 : 0);
|
|
43
|
+
return new DateTime(numeric);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* This method is shorthand for `DateTime.create` with `utc` set to `false`.
|
|
47
|
+
*/
|
|
48
|
+
static local(year, month, day, hour, minute, second) {
|
|
49
|
+
return DateTime.create(year, month, day, hour, minute, second, false);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* This method is shorthand for `DateTime.create` with `utc` set to `true`.
|
|
53
|
+
*/
|
|
54
|
+
static utc(year, month, day, hour, minute, second) {
|
|
55
|
+
return DateTime.create(year, month, day, hour, minute, second, true);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Creates a new DateTime object from the given plain object.
|
|
59
|
+
*/
|
|
60
|
+
static fromObject(object, options) {
|
|
61
|
+
return DateTime.create(object.year, object.month, object.day, object.hour, object.minute, object.second, !!options?.utc);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Creates a new DateTime object from provided string representation of a date according to RFC 5545.
|
|
65
|
+
*/
|
|
66
|
+
static fromString(str) {
|
|
67
|
+
const typeError = new TypeError('Invalid date time string');
|
|
68
|
+
if (str.length > 16 || str.length < 15) {
|
|
69
|
+
throw typeError;
|
|
70
|
+
}
|
|
71
|
+
const year = parseInt(str.slice(0, 4));
|
|
72
|
+
const month = parseInt(str.slice(4, 6));
|
|
73
|
+
const day = parseInt(str.slice(6, 8));
|
|
74
|
+
const hour = parseInt(str.slice(9, 11));
|
|
75
|
+
const minute = parseInt(str.slice(11, 13));
|
|
76
|
+
const second = parseInt(str.slice(13, 15));
|
|
77
|
+
const utc = str.endsWith('Z');
|
|
78
|
+
if (isNaN(year) ||
|
|
79
|
+
isNaN(month) ||
|
|
80
|
+
isNaN(day) ||
|
|
81
|
+
isNaN(hour) ||
|
|
82
|
+
isNaN(minute) ||
|
|
83
|
+
isNaN(second)) {
|
|
84
|
+
throw typeError;
|
|
85
|
+
}
|
|
86
|
+
return DateTime.create(year, month, day, hour, minute, second, utc);
|
|
87
|
+
}
|
|
88
|
+
/** @internal */
|
|
89
|
+
static fromNumeric(numeric) {
|
|
90
|
+
return new DateTime(numeric);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Converts DateTime into a plain object.
|
|
94
|
+
*/
|
|
95
|
+
toObject() {
|
|
96
|
+
return {
|
|
97
|
+
year: this.year,
|
|
98
|
+
month: this.month,
|
|
99
|
+
day: this.day,
|
|
100
|
+
hour: this.hour,
|
|
101
|
+
minute: this.minute,
|
|
102
|
+
second: this.second,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Converts DateTime into ISO 8601 string:
|
|
107
|
+
* - `YYYYMMDDTHHMMSSZ` for UTC
|
|
108
|
+
* - `YYYYMMDDTHHMMSS` for local
|
|
109
|
+
*/
|
|
110
|
+
toString() {
|
|
111
|
+
const year = this.year.toString().padStart(4, '0');
|
|
112
|
+
const month = this.month.toString().padStart(2, '0');
|
|
113
|
+
const day = this.day.toString().padStart(2, '0');
|
|
114
|
+
const hour = this.hour.toString().padStart(2, '0');
|
|
115
|
+
const minute = this.minute.toString().padStart(2, '0');
|
|
116
|
+
const second = this.second.toString().padStart(2, '0');
|
|
117
|
+
return `${year}${month}${day}T${hour}${minute}${second}${this.utc ? 'Z' : ''}`;
|
|
118
|
+
}
|
|
119
|
+
/** @internal */
|
|
120
|
+
toNumeric() {
|
|
121
|
+
return this.numeric;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.DateTime = DateTime;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lib"), exports);
|
|
18
|
+
__exportStar(require("./lib"), exports);
|
|
19
|
+
__exportStar(require("./lib"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * require("./lib")
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* auto-generated by NAPI-RS */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export declare class RRule {
|
|
4
|
+
constructor(frequency: Frequency, interval?: number | undefined | null, count?: number | undefined | null, weekstart?: Weekday | undefined | null, until?: number | undefined | null, byWeekday?: (readonly (NWeekday | Weekday)[]) | undefined | null, byHour?: (readonly number[]) | undefined | null, byMinute?: (readonly number[]) | undefined | null, bySecond?: (readonly number[]) | undefined | null, byMonthday?: (readonly number[]) | undefined | null, bySetpos?: (readonly number[]) | undefined | null, byMonth?: (readonly number[]) | undefined | null, byWeekno?: (readonly number[]) | undefined | null, byYearday?: (readonly number[]) | undefined | null)
|
|
5
|
+
static parse(str: string): RRule
|
|
6
|
+
get frequency(): Frequency
|
|
7
|
+
get interval(): number | null
|
|
8
|
+
get count(): number | null
|
|
9
|
+
get byWeekday(): NWeekday[]
|
|
10
|
+
get byHour(): Array<number>
|
|
11
|
+
get byMinute(): Array<number>
|
|
12
|
+
get bySecond(): Array<number>
|
|
13
|
+
get byMonthday(): Array<number>
|
|
14
|
+
get bySetpos(): Array<number>
|
|
15
|
+
get byMonth(): Month[]
|
|
16
|
+
get byWeekno(): Array<number>
|
|
17
|
+
get byYearday(): Array<number>
|
|
18
|
+
get weekstart(): Weekday | null
|
|
19
|
+
get until(): number | null
|
|
20
|
+
toString(): string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export declare class RRuleSet {
|
|
24
|
+
constructor(dtstart: number, tzid?: string | undefined | null, rrules?: (readonly RRule[]) | undefined | null, exrules?: (readonly RRule[]) | undefined | null, exdates?: (readonly number[]) | undefined | null, rdates?: (readonly number[]) | undefined | null)
|
|
25
|
+
get tzid(): string | null
|
|
26
|
+
get dtstart(): number
|
|
27
|
+
get rrules(): RRule[]
|
|
28
|
+
get exrules(): RRule[]
|
|
29
|
+
get exdates(): number[]
|
|
30
|
+
get rdates(): number[]
|
|
31
|
+
static parse(str: string): RRuleSet
|
|
32
|
+
all(limit?: number | undefined | null): number[]
|
|
33
|
+
between(afterDatetime: number, beforeDatetime: number, inclusive?: boolean | undefined | null): number[]
|
|
34
|
+
setFromString(str: string): this
|
|
35
|
+
toString(): string
|
|
36
|
+
iterator(): RRuleSetIterator
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export declare class RRuleSetIterator {
|
|
40
|
+
next(): number | null
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export declare enum Frequency {
|
|
44
|
+
Yearly = 0,
|
|
45
|
+
Monthly = 1,
|
|
46
|
+
Weekly = 2,
|
|
47
|
+
Daily = 3,
|
|
48
|
+
Hourly = 4,
|
|
49
|
+
Minutely = 5,
|
|
50
|
+
Secondly = 6
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export declare enum Month {
|
|
54
|
+
January = 1,
|
|
55
|
+
February = 2,
|
|
56
|
+
March = 3,
|
|
57
|
+
April = 4,
|
|
58
|
+
May = 5,
|
|
59
|
+
June = 6,
|
|
60
|
+
July = 7,
|
|
61
|
+
August = 8,
|
|
62
|
+
September = 9,
|
|
63
|
+
October = 10,
|
|
64
|
+
November = 11,
|
|
65
|
+
December = 12
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface NWeekday {
|
|
69
|
+
n?: number
|
|
70
|
+
weekday: Weekday
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export declare enum Weekday {
|
|
74
|
+
Monday = 0,
|
|
75
|
+
Tuesday = 1,
|
|
76
|
+
Wednesday = 2,
|
|
77
|
+
Thursday = 3,
|
|
78
|
+
Friday = 4,
|
|
79
|
+
Saturday = 5,
|
|
80
|
+
Sunday = 6
|
|
81
|
+
}
|
|
82
|
+
|