Skip to content

Commit

Permalink
short time, no % when null
Browse files Browse the repository at this point in the history
  • Loading branch information
rrelyea committed Jun 21, 2023
1 parent 81be466 commit 50f07fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Pages/Portfolio.razor
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Portfolio@(stepPath==null?": review":": "+stepPath.Replace('-',' ')) - bogle.too
<td style=text-align:right;padding-left:8px>@formatDoubleFourDecimal(investment.Shares)</td>
<td style=text-align:right;padding-left:8px>@formatMoney(investment.Value)</td>
<td style=text-align:right;padding-left:8px>@formatPercent3(investment.PercentChange)</td>
<td style=text-align:right;padding-left:8px>@investment.LastUpdated</td>
<td style=text-align:right;padding-left:8px>@investment.LastUpdated?.ToShortTimeString()</td>
</tr>
}
</table>
Expand Down Expand Up @@ -855,7 +855,7 @@ Portfolio@(stepPath==null?": review":": "+stepPath.Replace('-',' ')) - bogle.too
}
public string formatPercent3(double? amount)
{
return String.Format("{0:#,0.###}%", amount);
return amount.HasValue ? String.Format("{0:#,#.###}%", amount) : "";
}
public string estimatePortfolio(IFamilyData familyData)
{
Expand Down

0 comments on commit 50f07fa

Please sign in to comment.