Author Topic: Issues with setting Dates in Preferences  (Read 9935 times)

0 Members and 2 Guests are viewing this topic.

Offline Matjaz

  • VIP
  • Sr. Member
  • *
  • Posts: 67
    • View Profile
Issues with setting Dates in Preferences
« on: February 19, 2026, 13:58:17 »
Hi,

I noticed the following issues/inconsistencies when trying to set the dates in Preferences > Data > General data (see the picture of my screen in the attachment):

1) In the drop-down list under Dates, I noticed that incorrect examples are listed for Numeric and Point. They should be corrected to Numeric (e.g. 25/01/1970) and Point (e.g. 25.01.1970) respectively.

2) The explanation in the bubble next to Dates only lists four possible choices, while there are actually five choices to select from.

3) When selecting Point the date was correctly set as dd.mm.yyyy. But only the first time I chose it. When I tried a few other options and selected Point again, the date was set with dots and spaces between day, month and year, and without leading zeros, e.g. 25. 1. 1970. (In fact, I wouldn't have anything against such an additional option for setting the date, as it would be in line with how dates are spelled in my language and probably some other European language as well; see also my post Date format proposal, Oct. 2, 2024.)

4) When after selecting Point and playing around with other options for dates, I never managed to get the date set correctly when selecting Numeric. The date was always set without dashes and in the same format as in Point.

I am using Ancestris 13. My settings are: Interface Language: System settings / Reports Language: GUI language.

Best regards,

Matjaz

Offline Zurga

  • VIP
  • Supernatural Member
  • *
  • Posts: 5 834
    • View Profile
Re: Issues with setting Dates in Preferences
« Reply #1 on: February 19, 2026, 14:31:03 »
We will check that.

Zurga

Offline Zurga

  • VIP
  • Supernatural Member
  • *
  • Posts: 5 834
    • View Profile
Re: Issues with setting Dates in Preferences
« Reply #2 on: February 19, 2026, 21:06:36 »
I don't reproduce the trouble with the change of date format.
The format follows your system settings when it comes to display one or two digits and the order of day and month.
For a Windows with American system for example, the date will be MM/dd/yyyy

I have updated the tooltip label.
It will be in the version tomorrow with the update.

Zurga

Offline Matjaz

  • VIP
  • Sr. Member
  • *
  • Posts: 67
    • View Profile
Re: Issues with setting Dates in Preferences
« Reply #3 on: February 19, 2026, 23:01:13 »
I'm not sure if this is of any use to you, but if I change the Interface Language to Polish (not my language) and select the numeric format of the date, the date is set as dd.mm.yyyy, e.g. 14.02.1929 (but with points instead of slashes). If I revert back to System settings, the date is automatically reset in the form of dd. mm. yyyy or d. m. yyyy, e.g. 14. 2. 1929.

Matjaz

Offline Zurga

  • VIP
  • Supernatural Member
  • *
  • Posts: 5 834
    • View Profile
Re: Issues with setting Dates in Preferences
« Reply #4 on: February 20, 2026, 07:44:41 »
Like I said before, the number of digits is defined by your localization.

Zurga

Offline Matjaz

  • VIP
  • Sr. Member
  • *
  • Posts: 67
    • View Profile
Re: Issues with setting Dates in Preferences
« Reply #5 on: February 20, 2026, 13:53:55 »
Thank you for your explanation about digits. I understand now about digits and possibly also about blank spaces.

I'm still wondering, though, if the fact that the slashes are replaced by dots when I select the Numeric format is also a result of my localization? The dates are apparently set in exactly the same format, regardless of whether I select Numeric or Point format!? The same thing happens when I change the interface language (e.g. from System settings to Polish). I find it confusing. Also I couldn't find any explanation for this fact in the documentation.

So, what will be the implication of all this if I want to share my family tree with relatives in USA or some other countries? It seems that I'm actually not able to adjust the format of dates accordingly.

I would appreciate if you could share your final thoughts on this matter.

Matjaž

Offline Zurga

  • VIP
  • Supernatural Member
  • *
  • Posts: 5 834
    • View Profile
Re: Issues with setting Dates in Preferences
« Reply #6 on: February 20, 2026, 14:46:52 »
The internal format of date is always the GEDCOM format.
The format of date is only for display purpose.
When you set a date, you will always have a widget with day, month and year separated.

The change from "/" to "." is done manually after the date is localized by the system.
If you want, the exact code is :
java.util.Calendar c = java.util.Calendar.getInstance();
c.set(yearAdjusted, month, day + 1);
synchronized (NUMERICDATEFORMAT) {
     final String value = NUMERICDATEFORMAT.format(c.getTime());
     if (format == GedcomDateFormat.POINT) {
           buffer.append(value.replace("/", "."));
      } else {
            buffer.append(value);
      }
}

With NUMERICDATEFORMAT result of this method :
   private static DateFormat initNumericDateFormat() {
        DateFormat result = DateFormat.getDateInstance(DateFormat.SHORT);
        try {
            // check SHORT pattern
            String pattern = ((SimpleDateFormat) DateFormat.getDateInstance(DateFormat.SHORT)).toPattern();
            // patch yy to yyyy if necessary
            int yyyy = pattern.indexOf("yyyy");
            if (yyyy < 0) {
                result = new SimpleDateFormat(pattern.replaceAll("yy", "yyyy"));
            }
        } catch (Throwable t) {
        }
        return result;
    }

So if your localization doesn't use "/", there is no conversion.
I don't know all settings from all countries.

Zurga

Offline Matjaz

  • VIP
  • Sr. Member
  • *
  • Posts: 67
    • View Profile
Re: Issues with setting Dates in Preferences
« Reply #7 on: February 20, 2026, 15:03:24 »
Thank you for this technical explanation. Things are clear now.

Best regards,

Matjaž