Ox.URL: format pos,in,out as in,out if pos equals in

This commit is contained in:
rolux 2014-01-17 12:50:29 +05:30
parent a919b43c2e
commit 5119a15173

View file

@ -509,8 +509,11 @@ Ox.URL = function(options) {
][0], ][0],
spanType = self.options.spanType[state.type][ spanType = self.options.spanType[state.type][
!state.item ? 'list' : 'item' !state.item ? 'list' : 'item'
][view]; ][view],
return (Ox.isArray(span) ? span : [span]).map(function(point) { points = Ox.contains(['date', 'duration'], spanType)
&& Ox.isArray(span) && span.length == 3 && span[0] == span[1]
? span.slice(1) : span;
return Ox.toArray(points).map(function(point) {
return Ox.isNumber(point) ? ( return Ox.isNumber(point) ? (
spanType == 'date' ? constructDate(point) spanType == 'date' ? constructDate(point)
: spanType == 'duration' ? constructDuration(point) : spanType == 'duration' ? constructDuration(point)