@@ -39,7 +39,6 @@ export class ExpressionDescriptor {
39
39
monthStartIndexZero = false ,
40
40
use24HourTimeFormat,
41
41
locale = null ,
42
- tzOffset = 0 ,
43
42
} : Options = { }
44
43
) : string {
45
44
// We take advantage of Destructuring Object Parameters (and defaults) in TS/ES6 and now we will reassemble back to
@@ -52,11 +51,10 @@ export class ExpressionDescriptor {
52
51
monthStartIndexZero : monthStartIndexZero ,
53
52
use24HourTimeFormat : use24HourTimeFormat ,
54
53
locale : locale ,
55
- tzOffset : tzOffset ,
56
54
} ;
57
55
58
56
if ( options . tzOffset ) {
59
- console . warn ( `'tzOffset' option has been deprecated and will be removed in a future release .` ) ;
57
+ console . warn ( `'tzOffset' option has been deprecated and is no longer supported .` ) ;
60
58
}
61
59
62
60
let descripter = new ExpressionDescriptor ( expression , options ) ;
@@ -328,22 +326,6 @@ export class ExpressionDescriptor {
328
326
}
329
327
330
328
let parsedExp = parseInt ( exp ) ;
331
- if ( this . options . tzOffset ) {
332
- const hourExpression = this . expressionParts [ 2 ] ;
333
- let hour : number = parseInt ( hourExpression ) + ( this . options . tzOffset ? this . options . tzOffset : 0 ) ;
334
- if ( hour >= 24 ) {
335
- parsedExp ++ ;
336
- } else if ( hour < 0 ) {
337
- parsedExp -- ;
338
- }
339
-
340
- if ( parsedExp > 6 ) {
341
- parsedExp = 0 ;
342
- } else if ( parsedExp < 0 ) {
343
- parsedExp = 6 ;
344
- }
345
- }
346
-
347
329
let description = this . i18n . daysOfTheWeekInCase
348
330
? this . i18n . daysOfTheWeekInCase ( form ) [ parsedExp ]
349
331
: daysOfWeekNames [ parsedExp ] ;
@@ -667,16 +649,6 @@ export class ExpressionDescriptor {
667
649
let hourOffset : number = 0 ;
668
650
let minuteOffset : number = 0 ;
669
651
670
- if ( this . options . tzOffset ) {
671
- hourOffset = this . options . tzOffset > 0 ? Math . floor ( this . options . tzOffset ) : Math . ceil ( this . options . tzOffset ) ;
672
-
673
- minuteOffset = parseFloat ( ( this . options . tzOffset % 1 ) . toFixed ( 2 ) ) ;
674
-
675
- if ( minuteOffset != 0 ) {
676
- minuteOffset *= 60 ;
677
- }
678
- }
679
-
680
652
let hour : number = parseInt ( hourExpression ) + hourOffset ;
681
653
let minute : number = parseInt ( minuteExpression ) + minuteOffset ;
682
654
0 commit comments