vivo-project/Vitro — pull request #7 by patrickmcelwee (2014-12-30 22:00:49+00:00)
Title: Allow getFormat function to accept qualified date precisions

When trying to use some of the helpful date functions in lib-datetime while customizing a page, I ran into this issue where the getFormat function wanted unqualified precisions like "yearPrecision". But I was passing in the precision directly from a listViewConfig statement, which was fully qualified. It seemed to me to make sense to override getFormat to permit both qualified and unqualified precisions. (The alternative would be to strip out the qualification, which would work, but is inconsistent with how I've worked with URIs elsewhere in the freemarker templates.)

This change allows the date precision to be a fully qualified URL, like
"http://vivoweb.org/ontology/core#yearPrecision", while still accepting
"yearPrecision"