MCPcopy Create free account
hub / github.com/BaseXdb/basex / date

Method date

basex-core/src/main/java/org/basex/query/value/item/Dur.java:209–217  ·  view source on GitHub ↗

Adds the date to the specified token builder. @param tb token builder

(final TokenBuilder tb)

Source from the content-addressed store, hash-verified

207 * @param tb token builder
208 */
209 final void date(final TokenBuilder tb) {
210 tb.add('P');
211 final long y = yea();
212 if(y != 0) { tb.addLong(Math.abs(y)); tb.add('Y'); }
213 final long m = mon();
214 if(m != 0) { tb.addLong(Math.abs(m)); tb.add('M'); }
215 final long d = day();
216 if(d != 0) { tb.addLong(Math.abs(d)); tb.add('D'); }
217 }
218
219 /**
220 * Adds the time to the specified token builder.

Callers 4

stringMethod · 0.95
DatMethod · 0.45
stringMethod · 0.45
DtmMethod · 0.45

Calls 6

yeaMethod · 0.95
monMethod · 0.95
dayMethod · 0.95
addLongMethod · 0.80
addMethod · 0.65
absMethod · 0.45

Tested by

no test coverage detected