List of usage examples for com.google.gwt.i18n.client.impl DateRecord setMilliseconds
public void setMilliseconds(int milliseconds)
From source file:com.calclab.emite.core.client.xmpp.datetime.gwt.DateTimeFormat.java
License:Open Source License
/** * Method subParseFractionalSeconds parses fractional seconds field. * /* w w w. j ava 2s .c om*/ * @param value * parsed numberic value * @param start * @param end * parse position * @param cal * DateRecord object that holds parsed value * @return <code>true</code> if parsing successful, otherwise * <code>false</code> */ private boolean subParseFractionalSeconds(int value, int start, int end, DateRecord cal) { // Fractional seconds left-justify. int i = end - start; if (i < 3) { while (i < 3) { value *= 10; i++; } } else { int a = 1; while (i > 3) { a *= 10; i--; } value = (value + (a >> 1)) / a; } cal.setMilliseconds(value); return true; }