From b000c1d532aa51b3d1519feedb87af0688306b33 Mon Sep 17 00:00:00 2001 From: Vivek Pandey Date: Sat, 19 Oct 2024 19:24:41 +0530 Subject: [PATCH] Removing console log and approx sign --- src/util-frontend.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/util-frontend.js b/src/util-frontend.js index c867c446..505ae831 100644 --- a/src/util-frontend.js +++ b/src/util-frontend.js @@ -235,15 +235,10 @@ class RelativeTimeFormatter { /** * Method to update the instance locale and options * @param {string} locale Localization identifier (e.g., "en", "ar-sy") to update the instance with. - * @param {object} options Instance options to be passed. * @returns {void} No return value. */ - updateLocale(locale, options = {}) { + updateLocale(locale) { this.locale = locale; - this.options = { - ...this.options, - ...options, - }; this.rtf = new Intl.RelativeTimeFormat(this.locale, this.options); } @@ -266,7 +261,6 @@ class RelativeTimeFormatter { */ const toFormattedPart = (value, unitOfTime) => { const res = this.getInstance().formatToParts(value, unitOfTime); - console.log(res); let formattedString = res .map((part, _idx) => { if ( @@ -297,7 +291,7 @@ class RelativeTimeFormatter { const result = parts.length > 0 - ? `~ ${parts.join(" ")}` + ? `${parts.join(" ")}` : this.getInstance().format(0, "second"); // Handle case for 0 seconds return result;