erengy / taiga

A lightweight anime tracker for Windows
https://taiga.moe
GNU General Public License v3.0
2.08k stars 222 forks source link

Custom date format #838

Open as280093 opened 4 years ago

as280093 commented 4 years ago

The current date format is YY/MM/DD there should a option to change date format or get from the system.

FreezyLemon commented 2 years ago

The only date format I can find is YYYY-MM-DD: https://github.com/erengy/taiga/blob/2b7a7dc1bc368b4b428821472fae46878ef51ecb/src/base/time.cpp#L93-L95

Can you elaborate where exactly you see YY/MM/DD? There could maybe be different 'to_string' functions based on whether it's for UI or for filenames (for files, YYYY-MM-DD makes sense for sorting and searching)

paulo27ms commented 2 years ago

This issue is probably talking about the date fields on anime settings (that you pass to the tracker) which is indeed YYYY-MM-DD but I reckon this person wants to have something like MM-DD-YYYY.

FreezyLemon commented 2 years ago

Ah, that makes sense. If we want to adapt the Date formatting to the system, I think the easiest out-of-the-box way is via std::locale. Looking at the classes Date and FullDate, it seems a bit like there is some refactoring or something to do anyways? Not sure