@@ -9,7 +9,6 @@ export interface RRuleStrOptions {
99 dtstart : Date | null
1010 dtend : Date | null
1111 dtvalue : DateTimeValue | null
12- dtfloating : boolean | null
1312 cache : boolean
1413 unfold : boolean
1514 forceset : boolean
@@ -25,7 +24,6 @@ const DEFAULT_OPTIONS: RRuleStrOptions = {
2524 dtstart : null ,
2625 dtend : null ,
2726 dtvalue : null ,
28- dtfloating : false ,
2927 cache : false ,
3028 unfold : false ,
3129 forceset : false ,
@@ -39,7 +37,7 @@ export function parseInput (s: string, options: Partial<RRuleStrOptions>) {
3937 let exrulevals : Partial < Options > [ ] = [ ]
4038 let exdatevals : Date [ ] = [ ]
4139
42- let { dtstart, dtfloating , dtvalue, tzid } = parseDateTime ( s )
40+ let { dtstart, dtvalue, tzid } = parseDateTime ( s )
4341 let dtend : Date | null = null
4442
4543 const lines = splitIntoLines ( s , options . unfold )
@@ -95,9 +93,6 @@ export function parseInput (s: string, options: Partial<RRuleStrOptions>) {
9593 } else if ( dtstart && tzid !== parsed . tzid ) {
9694 // Different timezones.
9795 throw new Error ( 'Invalid rule: DTSTART and DTEND must have the same timezone' )
98- } else if ( dtstart && dtfloating !== parsed . dtfloating ) {
99- // Different floating types.
100- throw new Error ( 'Invalid rule: DTSTART and DTEND must both be floating' )
10196 }
10297 dtend = parsed . dtend
10398 }
@@ -112,7 +107,6 @@ export function parseInput (s: string, options: Partial<RRuleStrOptions>) {
112107 dtstart,
113108 dtend,
114109 dtvalue,
115- dtfloating,
116110 tzid,
117111 rrulevals,
118112 rdatevals,
@@ -130,7 +124,6 @@ function buildRule (s: string, options: Partial<RRuleStrOptions>) {
130124 dtstart,
131125 dtend,
132126 dtvalue,
133- dtfloating,
134127 tzid
135128 } = parseInput ( s , options )
136129
@@ -157,7 +150,7 @@ function buildRule (s: string, options: Partial<RRuleStrOptions>) {
157150 rrulevals . forEach ( val => {
158151 rset . rrule (
159152 new RRule (
160- groomRruleOptions ( val , dtstart , dtend , dtvalue , dtfloating , tzid ) ,
153+ groomRruleOptions ( val , dtstart , dtend , dtvalue , tzid ) ,
161154 noCache
162155 )
163156 )
@@ -170,7 +163,7 @@ function buildRule (s: string, options: Partial<RRuleStrOptions>) {
170163 exrulevals . forEach ( val => {
171164 rset . exrule (
172165 new RRule (
173- groomRruleOptions ( val , dtstart , dtend , dtvalue , dtfloating , tzid ) ,
166+ groomRruleOptions ( val , dtstart , dtend , dtvalue , tzid ) ,
174167 noCache
175168 )
176169 )
@@ -190,7 +183,6 @@ function buildRule (s: string, options: Partial<RRuleStrOptions>) {
190183 val . dtstart || options . dtstart || dtstart ,
191184 val . dtend || options . dtend || dtend ,
192185 val . dtvalue || options . dtvalue || dtvalue ,
193- val . dtfloating || options . dtfloating || dtfloating ,
194186 val . tzid || options . tzid || tzid
195187 ) , noCache )
196188}
@@ -202,13 +194,12 @@ export function rrulestr (
202194 return buildRule ( s , initializeOptions ( options ) )
203195}
204196
205- function groomRruleOptions ( val : Partial < Options > , dtstart ?: Date | null , dtend ?: Date | null , dtvalue ?: DateTimeValue | null , dtfloating ?: boolean | null , tzid ?: string | null ) {
197+ function groomRruleOptions ( val : Partial < Options > , dtstart ?: Date | null , dtend ?: Date | null , dtvalue ?: DateTimeValue | null , tzid ?: string | null ) {
206198 return {
207199 ...val ,
208200 dtstart,
209201 dtend,
210202 dtvalue,
211- dtfloating,
212203 tzid
213204 }
214205}
0 commit comments