use invariant culture for month names

This commit is contained in:
Florian Stinglmayr 2022-01-22 08:57:59 +01:00
parent f45c41cec7
commit d789c75116

View File

@ -2,11 +2,13 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;
using EDJournal;
namespace EliteBGS.BGS {
public class NonaDiscordLog : IDiscordLogGenerator {
private string FormatDate() {
CultureInfo cultureInfo = CultureInfo.InvariantCulture;
StringBuilder date = new StringBuilder();
DateTime today = DateTime.Now;
string suffix;
@ -20,7 +22,8 @@ namespace EliteBGS.BGS {
}
date.AppendFormat("{0} {1}{2}, {3}",
today.ToString("MMMM"), today.Day, suffix,
cultureInfo.DateTimeFormat.GetMonthName(today.Month),
today.Day, suffix,
today.Year + EliteDangerous.YearOffset
);