This issue is now about adding the following two types (or formats of the date type) to JTS:
Based on discussion in the Calendar fields (date/time) and the suggestion by @rgrp, the standard should contain a recommendation (not yet strict specification) for some calendar units:
The units should be added to the unit list.
@rgrp @akariv @roll
What do you think about this? AFAIK, in OpenSpending right now we use an integer type for years, for example. this would be more explicit
I'm +1 for the suggestion.
I just made a similar comment in #260 - i note that in the xsd spec you have gYear, gYearMonth.
Updated this issue description to be specifically about gYear and gYearMonth
I don't consider 'year-month' a unit. It's a date format. I prefer either adding named format values or using pattern/formatString as described in #260.
@jpmckinney year-month is a very common analytical concept as is uniquely specifies point on a date/time dimension at a month level of the year-month-* hierarchy (as opposed to say year-quarter-month-* hierarchy). It is also used as key-forming unit on derived aggregates at the given level. In this case it is very different from just being a format.
EDIT: Added example of alternative hierarchy.
@Stiivi All the current units are real units of measurement. The units of measurement for time are seconds, minutes, etc. but not with respect to any particular anchor.
YYYY and YYYY-MM only make sense given the anchor of 0 at roughly 2016 revolutions of the Earth around the Sun ago. They are not units, at least not in the same sense as the others.
[jts][s]: add gYear, gYearMonth types - fixes #105.
FIXED. Implemented gYear and gYearMonth following xmlschema-2
[jts][s]: lowercase gYear and gYearMonth - fixes #320 refs #105.
Why: consistency - all of our types are lowercase (e.g. datetime).
Follow up to last commit here 01aa7b6.