mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-29 05:55:21 -04:00
Use invariant culture
This commit is contained in:
parent
4efa6094dc
commit
de67cfae1c
3 changed files with 8 additions and 7 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
@ -152,11 +153,11 @@ public partial class ExportRequest
|
||||||
"%T" => channel.Parent?.Name ?? "",
|
"%T" => channel.Parent?.Name ?? "",
|
||||||
"%c" => channel.Id.ToString(),
|
"%c" => channel.Id.ToString(),
|
||||||
"%C" => channel.Name,
|
"%C" => channel.Name,
|
||||||
"%p" => channel.Position?.ToString() ?? "0",
|
"%p" => channel.Position?.ToString(CultureInfo.InvariantCulture) ?? "0",
|
||||||
"%P" => channel.Parent?.Position?.ToString() ?? "0",
|
"%P" => channel.Parent?.Position?.ToString(CultureInfo.InvariantCulture) ?? "0",
|
||||||
"%a" => after?.ToDate().ToString("yyyy-MM-dd") ?? "",
|
"%a" => after?.ToDate().ToString("yyyy-MM-dd", CultureInfo.InvariantCulture) ?? "",
|
||||||
"%b" => before?.ToDate().ToString("yyyy-MM-dd") ?? "",
|
"%b" => before?.ToDate().ToString("yyyy-MM-dd", CultureInfo.InvariantCulture) ?? "",
|
||||||
"%d" => DateTimeOffset.Now.ToString("yyyy-MM-dd"),
|
"%d" => DateTimeOffset.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture),
|
||||||
"%%" => "%",
|
"%%" => "%",
|
||||||
_ => m.Value
|
_ => m.Value
|
||||||
})
|
})
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<!--/wmm:ignore-->
|
<!--/wmm:ignore-->
|
||||||
|
|
||||||
<div class="postamble">
|
<div class="postamble">
|
||||||
<div class="postamble__entry">Exported @MessagesWritten.ToString("N0") message(s)</div>
|
<div class="postamble__entry">Exported @MessagesWritten.ToString("n0") message(s)</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -9,7 +9,7 @@ public static class BinaryExtensions
|
||||||
var buffer = new StringBuilder(2 * data.Length);
|
var buffer = new StringBuilder(2 * data.Length);
|
||||||
|
|
||||||
foreach (var b in data)
|
foreach (var b in data)
|
||||||
buffer.Append(b.ToString("X2"));
|
buffer.Append(b.ToString("x2"));
|
||||||
|
|
||||||
return buffer.ToString();
|
return buffer.ToString();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue