On Tue, Mar 1, 2011 at 11:14 PM, Roy Tennant <[log in to unmask]> wrote: >> On Tue, Mar 1, 2011 at 2:14 PM, Godmar Back <[log in to unmask]> wrote: >> >>Similarly, the date associated with a record can come in a variety of >>formats. Some are single-field (20080901), some are abbreviated >>(200811), some are separated into year, month, date, etc. Some >>records have a mixture of those. > > In this world of MARC (s/MARC/hurt) I call that an embarrassment of > riches. I've spent some bit of time parsing MARC, especially lately, > and just the fact that Summon provides a normalized date element is > HUGE. That's great to hear - but how do I know which elements to use? For instance, look at the JSON excerpt at http://api.summon.serialssolutions.com/help/api/search/response/documents "PublicationDateCentury":[ "1900" ], "PublicationDateDecade":[ "1970" ], "PublicationDateYear":[ "1979" ], "PublicationDate":[ "1979." ], "PublicationDate_xml":[ { "day":"01", "month":"01", "text":"1979.", "year":"1979" } ], Which one is the cleaned up date, and in which order shall I be looking for the date field in the record when some or all of this information is missing in a particular record? Andrew responded to that if given, PublicationDate_xml is the preferred one - but this raises the question which field in PublicationDate_xml to use: .text, .day, or .year? What if some are missing? What if PublicationDate_xml is missing, then I use or look for PublicationDate? Or is PublicationDateYear/Month/Decade preferred to PublicationDate? Which fields are derived from which others? These are the types of questions I'm looking to answer. - Godmar