9 references to FormatRunAge
Aspire.Dashboard (1)
Components\Dialogs\DashboardRunsDialog.razor.cs (1)
89: DashboardRunSelect.FormatRunAge(run.StartedAtUtc, TimeProvider.GetUtcNow(), Loc);
Aspire.Dashboard.Components.Tests (8)
Layout\MainLayoutTests.cs (8)
715Assert.Equal("a moment ago", DashboardRunSelect.FormatRunAge(now.AddSeconds(-59), now, loc)); 716Assert.Equal("a moment ago", DashboardRunSelect.FormatRunAge(now.AddSeconds(5), now, loc)); 717Assert.Equal("1 minute ago", DashboardRunSelect.FormatRunAge(now.AddMinutes(-1), now, loc)); 718Assert.Equal("45 minutes ago", DashboardRunSelect.FormatRunAge(now.AddMinutes(-45).AddSeconds(-30), now, loc)); 719Assert.Equal("1h ago", DashboardRunSelect.FormatRunAge(now.AddMinutes(-60), now, loc)); 720Assert.Equal("23h ago", DashboardRunSelect.FormatRunAge(now.AddHours(-23).AddMinutes(-59), now, loc)); 721Assert.Equal("1 day ago", DashboardRunSelect.FormatRunAge(now.AddDays(-1), now, loc)); 722Assert.Equal("2 days ago", DashboardRunSelect.FormatRunAge(now.AddDays(-2).AddHours(-5), now, loc));