specify / specify7

Specify 7
https://www.specifysoftware.org/products/specify-7/
GNU General Public License v2.0
66 stars 36 forks source link

Allow choosing partial date or full date in the formatter editor #3221

Open grantfitzsimmons opened 1 year ago

grantfitzsimmons commented 1 year ago

Reported by: Soraya at Bern

Hi, Partial dates are working well in the workbench and in the data entry forms, and also they are correctly exported, but they display as full (wrong) dates in the formatted collecting event form:

image

I modified the collecting event format in the record formatters app resource by selecting PartialDate from the options, but the partial date is still displayed a full date:

image

In the field formatters app resource the date elements look like this:

image

Requested by: Fedor on the Speciforum

We're having issues with the date format of what is exported as DwcA to be fed to GBIF and I cannot find the right place to adjust this.

GBIF prefers dates to be in the unambiguous format: YYYY-MM-DD

However, our Specify7 installation exports as: DD/MM/YYYY

Example dataset: https://www.gbif.org/dataset/58fc397b-eee4-4138-8a5f-50f9dfb00216

As a result, the dataset has about half of its collecting event dates set as being invalid: https://www.gbif.org/occurrence/search?dataset_key=58fc397b-eee4-4138-8a5f-50f9dfb00216&issue=RECORDED_DATE_INVALID

Example occurrence is the following: https://www.gbif.org/occurrence/2012932419

This has event date delivered as 11/01/1930 which GBIF refuses to parse, because it's ambiguous.

How can make sure the date format is 1930-01-11 ?


Issue:

@grantfitzsimmons

Could we do that with a custom formatter for that field? In the future^

@maxpatiiuk

I belive it uses the format from remote prefs right now Formatters in sp7 don't support partial days

Solution:

@maxpatiiuk:

The way sp6 fixed this is that it hardcoded some formatters to be for partial date and added Java code to treat those formatters in a special ways For sp7, we should just allow you to pick partial date or full date in the formatter editor

specifysoftware commented 1 year ago

This issue has been mentioned on Specify Community Forum. There might be relevant details there:

https://discourse.specifysoftware.org/t/date-format-in-dwca-export/1104/2

maxpatiiuk commented 1 year ago

Required changes:

grantfitzsimmons commented 7 months ago

Mentioned by Silvia at CSIC

grantfitzsimmons commented 3 months ago

From Soraya at Naturhistorisches Museum Bern on Discourse:

Hi, Partial dates are working well in the workbench and in the data entry forms, and also they are correctly exported, but they display as full (wrong) dates in the formatted collecting event form:

image

I modified the collecting event format in the record formatters app resource by selecting PartialDate from the options, but the partial date is still displayed a full date:

image

In the field formatters app resource the date elements look like this:

image

Is the first line in the pix right? The partialdate="Full" for the PartialDate element looks weird.

So, in short, is it possible to display partial dates as partial dates in the formatted collecting event form?

Cheers, Soraya

specifysoftware commented 3 months ago

This issue has been mentioned on Specify Community Forum. There might be relevant details there:

https://discourse.specifysoftware.org/t/partial-date-display-in-formatted-collecting-event-form/1907/2

grantfitzsimmons commented 2 months ago

This has also been reported by Heather Cole at AAFC and Nate Shoobs at Ohio State Mollusks