hbz / lobid-gnd

UI and API to the Integrated Authority File (Gemeinsame Normdatei, GND)
http://lobid.org/gnd
Eclipse Public License 2.0
24 stars 5 forks source link

Use en dash for date ranges #396

Closed rettinghaus closed 3 weeks ago

rettinghaus commented 4 weeks ago

Fixes #305.

fsteeg commented 4 weeks ago

Thanks for the PR @rettinghaus!

I think you got the wrong places for replacing the hyphens. The ones you replaced are only used internally / in the format query parameter as a marker (dateOfBirth-dateOfDeath). The actual output string (e.g. 1835-1910) should be the one generated here:

https://github.com/hbz/lobid-gnd/blob/92d96db2057e5e09c936350d410d2572c800ef86/app/models/AuthorityResource.java#L458

rettinghaus commented 3 weeks ago

@fsteeg Thanks for pointing me to this. Wouldn't have identified v1 and v2 as dates. 🤣

fsteeg commented 3 weeks ago

I don't think the other hyphens (from your original commit) should actually be replaced, that would make usage cumbersome (entering the en dash when configuring a call) and break existing usage of that API (even if it's undocumented).