Add net5.0 target framework

This commit is contained in:
Patrik Svensson
2020-11-11 10:55:47 +01:00
committed by Patrik Svensson
parent b1da5e7ba8
commit 380c6aca45
36 changed files with 241 additions and 194 deletions

View File

@ -0,0 +1,27 @@
using System;
using System.Globalization;
namespace Spectre.Console.Internal
{
internal static class DayOfWeekExtensions
{
public static string GetAbbreviatedDayName(this DayOfWeek day, CultureInfo culture)
{
culture ??= CultureInfo.InvariantCulture;
return culture.DateTimeFormat
.GetAbbreviatedDayName(day)
.Capitalize(culture);
}
public static DayOfWeek GetNextWeekDay(this DayOfWeek day)
{
var next = (int)day + 1;
if (next > (int)DayOfWeek.Saturday)
{
return DayOfWeek.Sunday;
}
return (DayOfWeek)next;
}
}
}