Raju Srivastava death: Funeral in Delhi today; Comedians Ahsaan Qureshi, Sunil Pal arrive for last rites
" + planName + ""; /* current plan info ends */ /* next billing html starts */ if (planData.next_billing_at != "" && planData.next_billing_at != "null" && typeof planData.next_billing_at != "undefined") {billingCycleText = "Next Billing Date : "; nextActivationDate = planData.next_billing_at; } else if (planData.expires_at != "" && planData.expires_at != "null" && typeof planData.expires_at != "undefined") {billingCycleText = "Expiry date : "; nextActivationDate = planData.expires_at; } else {billingCycleText = "Expiry date : "; nextActivationDate = planData.current_term_ends_at; } var nextBillingMonth = new Date(nextActivationDate).toDateString().split(" ")[1]; var nextBillingDay = new Date(nextActivationDate).getUTCDate(); var nextBillingYear = new Date(nextActivationDate).getFullYear(); var nextBillingHtml = nextBillingDay ? "" + billingCycleText + nextBillingDay + " " + nextBillingMonth + " " + nextBillingYear + "
" + planDescName + " ₹ " + planPrice + "
" + nextBillingHtml + "
"; document.getElementById("userPlanMSSec").style = "display: block;"; document.getElementById("userPlanMSSec").innerHTML = html; } } else if (planData.plan.plan_type.toLowerCase().includes("wsj") && wsjEmail != "") {html = "MANAGE SUBSCRIPTION" + renewText + currentPlanInfo + nextBillingHtml + wsjHtml + "
"; document.getElementById("userPlanMSSec").style = "display: block;"; document.getElementById("userPlanMSSec").innerHTML = html; getWsjStatus(wsjEmail); } else {html = "MANAGE SUBSCRIPTION" + renewText + currentPlanInfo + nextBillingHtml + "
"; document.getElementById("userPlanMSSec").style = "display: block;"; document.getElementById("userPlanMSSec").innerHTML = html; } if (partnerValue == "comviva") {document.getElementById("manageSub").style = "display: none;"; } } else {if (!document.getElementById("userProfileInfo").classList.contains("subsUpdated")) {var msgEl = document.createElement("div"); msgEl.classList.add("newBlock"); msgEl.classList.add("planSec"); msgEl.innerHTML = "Subscribe Now"; document.getElementById("userProfileInfo").after(msgEl); document.getElementById("userProfileInfo").classList.add("subsUpdated"); } } } } }; xhr.open("GET", "/subscription/fetch/userinfo/" + window.getCookie("token")); xhr.send(); } function closePopUp(elm) {var isSubscribedCookie = getCookie("isSubscribed"); if (isSubscribedCookie !== "undefined" && isSubscribedCookie) {setCookieNewsletter("isSubscribed", isSubscribedCookie, -1); } if (elm !== "undefined" && elm && document.getElementById(elm)) {document.getElementById("newsltrOvrlay").style.display = "none"; document.getElementById(elm).style.display = "none"; } } function openUserSideProfile() {closePopUp("thnkNewsletter"); getUserData(); ga("send", "event", "my_account", "Click"); document.getElementById("myAccount").style.width = "320px"; document.getElementById("Userbgoverlay").style.display = "block"; var trackData = {}; trackWebEngageEvents("My Account Viewed", trackData); } function closeUserSideProfile() {document.getElementById("myAccount").style.width = "0"; document.getElementById("Userbgoverlay").style.display = "none"; } function goToManageSubscriptions(storyId, tenureEndDate, currentPlanName) {let redirectUrl = "https://accounts.hindustantimes.com/lm/managesubscription"; let queryParamString = trackRenewClick(storyId, tenureEndDate, currentPlanName); redirectUrl += queryParamString; redirectUrl += "&check_app=true"; setTimeout(() => {window.location.href = redirectUrl; }, 500) } function isWithinDiscounted(tenureEndDate) {try {const diffDays = dateDiff(tenureEndDate); if ((diffDays > -61 && diffDays 16 && diffDays 14) {return true; } else {return false; } } catch (e) {console.log(e); return false; } } function dateDiff(date) {const dateCompare = new Date(date); const dateToday = new Date(); const diffTime = dateToday - dateCompare; const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); return diffDays; } function getDaysInExpiry(tenureEndDate) {try {const diffDays = dateDiff(tenureEndDate) - 1; let daysInExpiry = ""; if (diffDays > 0) {daysInExpiry = "D+" + diffDays; } else {daysInExpiry = "D" + diffDays; } return daysInExpiry; } catch (e) {console.log(e); return ""; } } function getWsjStatus(wsjEmail) {var wsjStatusHtml = ""; var xhrWsj = new XMLHttpRequest(); xhrWsj.onreadystatechange = function() {if (xhrWsj.readyState === 4) {var dataWsj = JSON.parse(xhrWsj.responseText); if (dataWsj && dataWsj.data && dataWsj.data.redemption_code_status && dataWsj.data.redemption_code_status != "" && dataWsj.data.redemption_code_status != "null" && typeof dataWsj.data.redemption_code_status != "undefined") {redemptionCodeStatus = dataWsj.data.redemption_code_status; if (redemptionCodeStatus == "EXHAUSTED") {wsjStatusHtml = 'Your WSJ subscription is active
'; document.getElementById("activateWsj").innerHTML = wsjStatusHtml; } else {if (dataWsj.data.redemption_url != null && typeof dataWsj.data.redemption_url != "undefined" && dataWsj.data.redemption_url != "") {wsjStatusHtml = "