sciencehistory / chf-sufia

sufia-based hydra app
Other
9 stars 4 forks source link

date display formatting #876

Closed jrochkind closed 6 years ago

jrochkind commented 7 years ago

Things we didn't get to in #718.

jrochkind commented 6 years ago

renamed to "date display formatting" cause that's the only thing left here.

jrochkind commented 6 years ago

@eddierubeiz the dates right now show up "unformatted" as 2018-01-01. My thought was to put the month in there instead 2018-Jan-01, or something (anything) like that. (Note some dates are just year, or just month and year, or ranges, etc).

Additionally, there is some weirdness with the qualifiers. For instance, some dates now show up as "1950s (decade)", where just "1950s" is probably fine. (On the other hand, 1900s may need a decade vs century qualifier, I dunno).

I suggest you play around in a dev or staging copy with the date entry in management screen, to see all the possibilities (some of the things date entry allows don't actually make any sense though; validation is a separate ticket :) ), and see what you think makes sense.

eddierubeiz commented 6 years ago

Sounds great.

jrochkind commented 6 years ago

oh, and replace the hyphen with a proper en-dash (which most style guides say to use for date ranges) was also on my list. :)

eddierubeiz commented 6 years ago

I've never worked anywhere that knew – much less cared – about the difference. (See what I did there?)

jrochkind commented 6 years ago

Also note that while the current code formats dates at indexing time and stores the formatted string in the index -- due to recent work, we know have access to the complete date structures at display-time, so you could instead choose to format it from date data at display-time, on the fly. Either are plausible approaches.

eddierubeiz commented 6 years ago

OK -- this took forever but I learned a lot. Some notes about this initial attempt: