Date format - Display leading zero for days

Gramps version 5.1.2; Linux Mint 20, 64 bit
After setting my display date format to DAY MON YEAR, I mostly get my desired results but I’d like to always show leading zeros for the days. Is this possible?
Now: 4 May 1939
Desired: 04 May 1939
Even better: 04 MAY 1939
Thanks!
Craig

At the moment, it is impossible to do. Even if it were possible, we would have to modify all date language handlers.
Do you have a real reason for asking this?
In today’s life, we always write 4 and not 04.
For the month, MAY was used in gedcom because Windows wanted to have capitals at the beginning.
It was in the 1980’s

It would be possible if Gramps supported the ISO 8601 Date standard and provided a way to customize the date settings.

Then DD MMM YYYY will be 04 Jul 1923 in English and 04 jul 1923 in i.e. Norwegian.

Just an easy example for the OS settings
Here is a screenshot of my settings in Windows, before and after change (since I use Norwegian and we don’t write month names with first letter in upper case, it will be all lower case):


I use an English Windows 10 with Norwegian input language as default.
This has been possible to change in Windows as long as I can remember, I don’t remember the first time I did date customization in the Windows Date settings but most likely it was in Windows NT 4.0.

The date settings in Gramps are limited, it should be possible to define any custom variant of the ISO standard, so this is just a limitation made by the developers. It has little or nothing to do with Windows vs. Linux vs. macOS.
I know that Linux support the format because my Debian Desktop are displaying that date format as default with leading Zero…

Python have full support for the ISO standard:
datetime — Basic date and time types — Python 3.9.1 documentation

As has GTK:
GDateTime: GLib Reference Manual (gnome.org)

AND JUST TO BE CLEAR !!!
This was just an example of the date format, The Date settings functionality in Gramps needs to be changed to be able to utilize customization of ISO Date standards, as it is now, it only have one ISO format and that is YYYY-DD-MM.

Thanks for the info folks! I’ll stick with the DAY MON YEAR setting in Gramps for now.

@SNoiraud - Regarding my reasoning; just a pet peeve of mine. I’ve always used leading zeros so was just hoping it was available. Not a big deal at all. :slight_smile:

I have a related issue. Sometimes a date that one finds only specifies the year and month. GRAMPS will take YYYY or YYYY-MM-DD but not YYYY-MM. I put the month in some other field or as a note, but then it is not visible when scanning a list of birth dates etc.

When using ISO format, if you want to skip the day, you put in 00 (1900-02-00). With the other formats you can leave out the day or month entirely.

The ISO format support only Year and Month, it shouldn’t be necessary to add 00 for the day, is that something specific for Python or Gramps?
Because if following the ISO format, you should be able to just use YYYY-MM, or any other variant…

Eeeww… That ISO methodology is ugly.

In some dating systems, the ZEROth day of a month is the last day of the previous month.

Well, day 00 is allowed in GRAMPS, so I’ll use it to mean “empty data” for my purposes. But it would be preferable to use YYYY-MM.

Thanks all!

Carey

PR #1170

1 Like

Do you know why?

Since it’s not a limit in either Linux, Windows nor macOS… and both GTK and Python has full support for the ISO 8601, at least as claimed in the documentation for both…

Do that only change what you can enter?

It would be nice if if a day is 00, unless you have the edit option, the 00 is not showown in event list for example.

You can enter a date in any format you want: ISO, julian, french republican, …

If a day is 00, that means you don’t know it . The best way to show that is to display only the year and month. If you really want to see 00, use the ISO format in the preferences.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.