@@ -132,7 +132,7 @@ export class Epoch extends mol.Entity.Base<EpochLike, Epoch>() {
132132 }
133133
134134 let number : NumLike , index : NumLike , length : NumLike ;
135- if ( epochLike instanceof Array ) {
135+ if ( Array . isArray ( epochLike ) ) {
136136 [ number , index , length ] = epochLike ;
137137 } else {
138138 ( { number, index, length } = epochLike ) ;
@@ -148,13 +148,6 @@ export class Epoch extends mol.Entity.Base<EpochLike, Epoch>() {
148148 return new Epoch ( 0n , 0n , numFrom ( 1 ) ) ;
149149 }
150150
151- /**
152- * Return an epoch representing one (1 + 0/1).
153- */
154- static one ( ) : Epoch {
155- return new Epoch ( numFrom ( 1 ) , 0n , numFrom ( 1 ) ) ;
156- }
157-
158151 /**
159152 * Return an epoch representing one cycle (180 + 0/1).
160153 *
@@ -281,8 +274,8 @@ export class Epoch extends mol.Entity.Base<EpochLike, Epoch>() {
281274
282275 return (
283276 reference . timestamp +
284- epochInMilliseconds * number +
285- ( epochInMilliseconds * index ) / length
277+ EPOCH_IN_MILLISECONDS * number +
278+ ( EPOCH_IN_MILLISECONDS * index ) / length
286279 ) ;
287280 }
288281}
@@ -293,4 +286,4 @@ export class Epoch extends mol.Entity.Base<EpochLike, Epoch>() {
293286 * Calculated as 4 hours in milliseconds:
294287 * 4 hours * 60 minutes per hour * 60 seconds per minute * 1000 milliseconds per second.
295288 */
296- const epochInMilliseconds = numFrom ( 14400000 ) ; // (Number.isSafeInteger(14400000) === true)
289+ const EPOCH_IN_MILLISECONDS = numFrom ( 4 * 60 * 60 * 1000 ) ;
0 commit comments