Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

How to format date in browse

I would like to be able to browse occurrences by coverage dates.
I added to browse.conf occurrence facet:
date_facet = {
type = attribute,
element_code = coveragedates,
group_mode = alphabetical,
label_singular = _("date"),
label_plural = _("dates")
}, ...

which kind of works, except the returned dates are formatted as: 01/01/1839 at 0:00 – ???? at 0:00 (1).
How/where can I format the returned dates as yyyy/mm/dd or yyyy/mm/dd - yyyy/mm/dd
to drop the time and only include '-' when end date is defined?

Thanks

Comments

  • edited November 2018

    Instead of type = attribute you should use type = normalizedDates. For example:

        year_facet = {
                    type = normalizedDates,
                    element_code = creation_date,
                    # 'normalization' can be: days, months, years, decades, centuries
                    normalization = years,
    
                    group_mode = none,
                    #single_value = 1950,
    
                    label_singular = _("year"),
                    label_plural = _("years")
                },
    
  • wow...that was easy. I must have looked at that wiki page 100 times and it never sunk in. I'll just blame it on pre mid-term election jitters.

    Thank you

Sign In or Register to comment.