{removeCompanyStrings($displayCompanyName)} Stock Price History

Select time frame (timePeriod = "Daily")} class="cursor-pointer sm:hover:bg-gray-300 dark:sm:hover:bg-primary" > Daily (timePeriod = "Weekly")} class="cursor-pointer sm:hover:bg-gray-300 dark:sm:hover:bg-primary" > Weekly {#if !["Pro", "Plus"]?.includes(data?.user?.tier)} {#each ["Monthly", "Quarterly", "Annual"] as entry} goto("/pricing")} class="cursor-pointer sm:hover:bg-gray-300 dark:sm:hover:bg-primary" > {entry} {/each} {:else} (timePeriod = "Monthly")} class="cursor-pointer sm:hover:bg-gray-300 dark:sm:hover:bg-primary" > Monthly (timePeriod = "Quarterly")} class="cursor-pointer sm:hover:bg-gray-300 dark:sm:hover:bg-primary" > Quarterly (timePeriod = "Annual")} class="cursor-pointer sm:hover:bg-gray-300 dark:sm:hover:bg-primary" > Annual {/if}
{#if rawData?.length !== 0}
{#each stockList as item, index} {/each}
{#if timePeriod === "Weekly"} Week of {new Date(item?.time).toLocaleString( "en-US", { month: "short", day: "numeric", year: "numeric", timeZone: "Europe/Berlin", }, )} {:else} {new Date(item?.time).toLocaleString("en-US", { month: "short", day: "numeric", year: "numeric", timeZone: "Europe/Berlin", })} {/if} {item?.open?.toFixed(2)} {item?.adjOpen !== undefined ? item?.adjOpen?.toFixed(2) : "n/a"} {item?.high?.toFixed(2)} {item?.adjHigh !== undefined && item?.adjHigh ? item?.adjHigh?.toFixed(2) : "n/a"} {item?.low?.toFixed(2)} {item?.adjLow !== undefined && item?.adjLow ? item?.adjLow?.toFixed(2) : "n/a"} {item?.close?.toFixed(2)} {item?.adjClose !== undefined ? item?.adjClose?.toFixed(2) : "n/a"} {item?.changesPercentage !== null ? item?.changesPercentage + "%" : "n/a"} {item?.volume?.toLocaleString("en-US")}
{:else} {/if}