List of usage examples for com.google.gwt.i18n.client.impl DateRecord setDayOfWeek
public void setDayOfWeek(int dayOfWeek)
From source file:com.calclab.emite.core.client.xmpp.datetime.gwt.DateTimeFormat.java
License:Open Source License
/** * Method subParseDayOfWeek parses day of the week field. * // ww w . j av a 2s.c o m * @param text * the time text to be parsed * @param pos * Parse position * @param start * from where parse start * @param cal * DateRecord object that holds parsed value * * @return <code>true</code> if parsing successful, otherwise * <code>false</code> */ private boolean subParseDayOfWeek(String text, int[] pos, int start, DateRecord cal) { int value; // 'E' - DAY_OF_WEEK // Want to be able to parse both short and long forms. // Try count == 4 (DDDD) first: value = matchString(text, start, dateTimeFormatInfo.weekdaysFull(), pos); if (value < 0) { value = matchString(text, start, dateTimeFormatInfo.weekdaysShort(), pos); } if (value < 0) { return false; } cal.setDayOfWeek(value); return true; }
From source file:com.calclab.emite.core.client.xmpp.datetime.gwt.DateTimeFormat.java
License:Open Source License
/** * Parses standalone day of the week field. * //from w ww . j a v a 2s. co m * @param text * the time text to be parsed * @param pos * Parse position * @param start * from where parse start * @param cal * DateRecord object that holds parsed value * * @return <code>true</code> if parsing successful, otherwise * <code>false</code> */ private boolean subParseStandaloneDay(String text, int[] pos, int start, DateRecord cal) { int value; // 'c' - DAY_OF_WEEK // Want to be able to parse both short and long forms. // Try count == 4 (cccc) first: value = matchString(text, start, dateTimeFormatInfo.weekdaysFullStandalone(), pos); if (value < 0) { value = matchString(text, start, dateTimeFormatInfo.weekdaysShortStandalone(), pos); } if (value < 0) { return false; } cal.setDayOfWeek(value); return true; }