Coder Social home page Coder Social logo

Comments (4)

Tyrrrz avatar Tyrrrz commented on May 24, 2024 1

Would you accept a pr that adds such a locale, or would you prefer some other command line argument?

I don't think I want to include it in the scope of the project, at least as of now. You're welcome to make a fork for your own usage, though.

from discordchatexporter.

p5nbTgip0r avatar p5nbTgip0r commented on May 24, 2024 1

The en-SE locale provides a similar format to ISO8601: 2024-01-12 21:31, tooltip: Friday, 12 January 2024 21:31

This is the snippet I used to list locales and their date formats: https://dotnetfiddle.net/TWm6Et

using System;
using System.Globalization;

class Program
{
    static void Main()
    {
		const string format = "{0,-11} | {1}";
		foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.AllCultures))
		{
			Console.WriteLine(format, ci.Name, ci.DateTimeFormat.ShortDatePattern);
		}
    }
}

from discordchatexporter.

Tyrrrz avatar Tyrrrz commented on May 24, 2024

Yes, --dateformat was removed as part of #879. The main reason for that was that the application used a lot more than just one format, but only one of them was somewhat configurable.

The locale option generally offers more flexibility, as you can achieve the same behavior that the Discord app provides via the Language tab in settings. Unfortunately, that also means setting a non-locale-specific date format (such as ISO8601) is no longer possible.

Note that if you hover over the date, the tooltip will show the date in a locale-specific full date-time format, which is mostly unambiguous (unlike mm/dd/yyyy). Otherwise, if you really need deterministic timestamp formats, it's recommended to use the JSON export instead. The HTML export is intended to mimic the look and behavior of the Discord app.

from discordchatexporter.

Zwelf avatar Zwelf commented on May 24, 2024

Thanks for your fast reply :). How viable would it be to add some iso-locale and special case it to always use this format?

Digging through #879, it seems like I would need to modify FormatDate, CultureInfo = ... and probably AvailableLocales? Would you accept a pr that adds such a locale, or would you prefer some other command line argument? (Not sure yet if and when I have time to get to creating a pr)

from discordchatexporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.