Skip to content

Commit 07b65b5

Browse files
committed
Mark methods that are not required by js-joda core as not supported
1 parent e8f6e50 commit 07b65b5

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

src/MomentZoneRules.js

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export class MomentZoneRules extends ZoneRules{
111111
return index;
112112
}
113113
}
114+
114115
_offsetByIndexInSeconds(index){
115116
return roundDown(+this._tzdbInfo.offsets[index]*60);
116117
}
@@ -216,8 +217,7 @@ export class MomentZoneRules extends ZoneRules{
216217
* @return {ZoneOffset} the standard offset, not null
217218
*/
218219
standardOffset(instant){
219-
// FIXME just a shortcut
220-
return this.offsetOfInstant(instant);
220+
notSupported('ZoneRules.standardOffset');
221221
}
222222

223223
/**
@@ -234,12 +234,7 @@ export class MomentZoneRules extends ZoneRules{
234234
* @return {Duration} the difference between the standard and actual offset, not null
235235
*/
236236
daylightSavings(instant){
237-
tbc('ZoneRules.daylightSavings');
238-
// default {
239-
// ZoneOffset standardOffset = getStandardOffset(instant);
240-
// ZoneOffset actualOffset = getOffset(instant);
241-
// return actualOffset.toDuration().minus(standardOffset.toDuration()).normalized();
242-
// }
237+
notSupported('ZoneRules.daylightSavings');
243238
}
244239

245240
/**
@@ -252,10 +247,7 @@ export class MomentZoneRules extends ZoneRules{
252247
* @return {boolean} the standard offset, not null
253248
*/
254249
isDaylightSavings(instant) {
255-
tbc('ZoneRules.isDaylightSavings');
256-
// default {
257-
// return (getStandardOffset(instant).equals(getOffset(instant)) == false);
258-
// }
250+
notSupported('ZoneRules.isDaylightSavings');
259251
}
260252

261253
/**
@@ -270,6 +262,7 @@ export class MomentZoneRules extends ZoneRules{
270262
* @return {boolean} true if the offset date-time is valid for these rules
271263
*/
272264
isValidOffset(localDateTime, offset){
265+
// FIXME
273266
return this.offsetOfLocalDateTime(localDateTime).equals(offset);
274267
}
275268

@@ -286,7 +279,7 @@ export class MomentZoneRules extends ZoneRules{
286279
* @return {ZoneOffsetTransition} the next transition after the specified instant, null if this is after the last transition
287280
*/
288281
nextTransition(instant){
289-
tbc('ZoneRules.nextTransition');
282+
notSupported('ZoneRules.nextTransition');
290283
}
291284

292285
/**
@@ -301,7 +294,7 @@ export class MomentZoneRules extends ZoneRules{
301294
* @return {ZoneOffsetTransition} the previous transition after the specified instant, null if this is before the first transition
302295
*/
303296
previousTransition(instant){
304-
tbc('ZoneRules.previousTransition');
297+
notSupported('ZoneRules.previousTransition');
305298
}
306299

307300
/**
@@ -317,7 +310,7 @@ export class MomentZoneRules extends ZoneRules{
317310
* @return {ZoneOffsetTransition[]} an immutable list of fully defined transitions, not null
318311
*/
319312
transitions(){
320-
tbc('ZoneRules.transitions');
313+
notSupported('ZoneRules.transitions');
321314
}
322315

323316
/**
@@ -342,7 +335,7 @@ export class MomentZoneRules extends ZoneRules{
342335
* @return {ZoneOffsetTransitionRule[]} an immutable list of transition rules, not null
343336
*/
344337
transitionRules(){
345-
tbc('ZoneRules.transitionRules');
338+
notSupported('ZoneRules.transitionRules');
346339
}
347340

348341
/**
@@ -391,6 +384,6 @@ function binarySearch(array, value) {
391384
return hi;
392385
}
393386

394-
function tbc(msg){
395-
throw new Error('not yet implemented: ' + msg);
387+
function notSupported(msg){
388+
throw new Error('not supported: ' + msg);
396389
}

0 commit comments

Comments
 (0)