public boolean appendUnitSeparator ( TimeUnit unit , boolean longSep , boolean afterFirst , boolean beforeLast , StringBuffer sb ) { // long seps // false, false "...b', '...d" // false, true "...', and 'c" // true, false - "a', '...c" // true, true - "a' and 'b" if ( ( longSep && dr . unitSep != null ) || dr . shortUnitSep != null ) { if ( longSep && dr . unitSep != null ) { int ix = ( afterFirst ? 2 : 0 ) + ( beforeLast ? 1 : 0 ) ; sb . append ( dr . unitSep [ ix ] ) ; return dr . unitSepRequiresDP != null && dr . unitSepRequiresDP [ ix ] ; } sb . append ( dr . shortUnitSep ) ; // todo: investigate whether DP is required } return false ; }
Append the appropriate separator between units