Skip to content

Commit

Permalink
fix: substr is deprecated (#766)
Browse files Browse the repository at this point in the history
Co-authored-by: Caleb ツ Everett <calebev@amazon.com>
  • Loading branch information
everett1992 and Caleb ツ Everett authored Aug 31, 2023
1 parent a2e10f6 commit 022449d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/IonTimestamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ export class Timestamp {
let fractionStr = "";
if (exp < 0) {
const idx = Math.max(coefStr.length + exp, 0);
secondsStr = coefStr.substr(0, idx);
fractionStr = coefStr.substr(idx);
secondsStr = coefStr.substring(0, idx);
fractionStr = coefStr.substring(idx);
if (-secondsDecimal.getExponent() - coefStr.length > 0) {
fractionStr = "0".repeat(-exp - coefStr.length) + fractionStr;
}
Expand Down

0 comments on commit 022449d

Please sign in to comment.