本文整理了Java中java.text.SimpleDateFormat.parseText()
方法的一些代码示例,展示了SimpleDateFormat.parseText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SimpleDateFormat.parseText()
方法的具体详情如下:
包路径:java.text.SimpleDateFormat
类名称:SimpleDateFormat
方法名:parseText
暂无
代码示例来源:origin: robovm/robovm
private int parseDayOfWeek(String string, int offset, boolean standAlone) {
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneWeekdayNames : formatData.weekdays,
Calendar.DAY_OF_WEEK);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneWeekdayNames : formatData.shortWeekdays,
Calendar.DAY_OF_WEEK);
}
return index;
}
代码示例来源:origin: robovm/robovm
private int parseMonth(String string, int offset, int count, int absolute, boolean standAlone) {
if (count <= 2) {
return parseNumber(absolute, string, offset, Calendar.MONTH, -1);
}
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneMonthNames : formatData.months,
Calendar.MONTH);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneMonthNames : formatData.shortMonths,
Calendar.MONTH);
}
return index;
}
代码示例来源:origin: robovm/robovm
return parseText(string, offset, formatData.eras, Calendar.ERA);
case YEAR_FIELD:
if (count >= 3) {
break;
case AM_PM_FIELD:
return parseText(string, offset, formatData.ampms, Calendar.AM_PM);
case HOUR1_FIELD: // 'h'
position = new ParsePosition(offset);
代码示例来源:origin: ibinti/bugvm
private int parseDayOfWeek(String string, int offset, boolean standAlone) {
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneWeekdayNames : formatData.weekdays,
Calendar.DAY_OF_WEEK);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneWeekdayNames : formatData.shortWeekdays,
Calendar.DAY_OF_WEEK);
}
return index;
}
代码示例来源:origin: MobiVM/robovm
private int parseDayOfWeek(String string, int offset, boolean standAlone) {
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneWeekdayNames : formatData.weekdays,
Calendar.DAY_OF_WEEK);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneWeekdayNames : formatData.shortWeekdays,
Calendar.DAY_OF_WEEK);
}
return index;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
private int parseDayOfWeek(String string, int offset, boolean standAlone) {
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneWeekdayNames : formatData.weekdays,
Calendar.DAY_OF_WEEK);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneWeekdayNames : formatData.shortWeekdays,
Calendar.DAY_OF_WEEK);
}
return index;
}
代码示例来源:origin: com.gluonhq/robovm-rt
private int parseDayOfWeek(String string, int offset, boolean standAlone) {
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneWeekdayNames : formatData.weekdays,
Calendar.DAY_OF_WEEK);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneWeekdayNames : formatData.shortWeekdays,
Calendar.DAY_OF_WEEK);
}
return index;
}
代码示例来源:origin: com.bugvm/bugvm-rt
private int parseDayOfWeek(String string, int offset, boolean standAlone) {
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneWeekdayNames : formatData.weekdays,
Calendar.DAY_OF_WEEK);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneWeekdayNames : formatData.shortWeekdays,
Calendar.DAY_OF_WEEK);
}
return index;
}
代码示例来源:origin: FlexoVM/flexovm
private int parseDayOfWeek(String string, int offset, boolean standAlone) {
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneWeekdayNames : formatData.weekdays,
Calendar.DAY_OF_WEEK);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneWeekdayNames : formatData.shortWeekdays,
Calendar.DAY_OF_WEEK);
}
return index;
}
代码示例来源:origin: MobiVM/robovm
private int parseMonth(String string, int offset, int count, int absolute, boolean standAlone) {
if (count <= 2) {
return parseNumber(absolute, string, offset, Calendar.MONTH, -1);
}
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneMonthNames : formatData.months,
Calendar.MONTH);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneMonthNames : formatData.shortMonths,
Calendar.MONTH);
}
return index;
}
代码示例来源:origin: ibinti/bugvm
private int parseMonth(String string, int offset, int count, int absolute, boolean standAlone) {
if (count <= 2) {
return parseNumber(absolute, string, offset, Calendar.MONTH, -1);
}
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneMonthNames : formatData.months,
Calendar.MONTH);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneMonthNames : formatData.shortMonths,
Calendar.MONTH);
}
return index;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
private int parseMonth(String string, int offset, int count, int absolute, boolean standAlone) {
if (count <= 2) {
return parseNumber(absolute, string, offset, Calendar.MONTH, -1);
}
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneMonthNames : formatData.months,
Calendar.MONTH);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneMonthNames : formatData.shortMonths,
Calendar.MONTH);
}
return index;
}
代码示例来源:origin: com.gluonhq/robovm-rt
private int parseMonth(String string, int offset, int count, int absolute, boolean standAlone) {
if (count <= 2) {
return parseNumber(absolute, string, offset, Calendar.MONTH, -1);
}
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneMonthNames : formatData.months,
Calendar.MONTH);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneMonthNames : formatData.shortMonths,
Calendar.MONTH);
}
return index;
}
代码示例来源:origin: com.bugvm/bugvm-rt
private int parseMonth(String string, int offset, int count, int absolute, boolean standAlone) {
if (count <= 2) {
return parseNumber(absolute, string, offset, Calendar.MONTH, -1);
}
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneMonthNames : formatData.months,
Calendar.MONTH);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneMonthNames : formatData.shortMonths,
Calendar.MONTH);
}
return index;
}
代码示例来源:origin: FlexoVM/flexovm
private int parseMonth(String string, int offset, int count, int absolute, boolean standAlone) {
if (count <= 2) {
return parseNumber(absolute, string, offset, Calendar.MONTH, -1);
}
LocaleData ld = formatData.localeData;
int index = parseText(string, offset,
standAlone ? ld.longStandAloneMonthNames : formatData.months,
Calendar.MONTH);
if (index < 0) {
index = parseText(string, offset,
standAlone ? ld.shortStandAloneMonthNames : formatData.shortMonths,
Calendar.MONTH);
}
return index;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
return parseText(string, offset, formatData.eras, Calendar.ERA);
case YEAR_FIELD:
if (count >= 3) {
break;
case AM_PM_FIELD:
return parseText(string, offset, formatData.ampms, Calendar.AM_PM);
case HOUR1_FIELD: // 'h'
position = new ParsePosition(offset);
代码示例来源:origin: ibinti/bugvm
return parseText(string, offset, formatData.eras, Calendar.ERA);
case YEAR_FIELD:
if (count >= 3) {
break;
case AM_PM_FIELD:
return parseText(string, offset, formatData.ampms, Calendar.AM_PM);
case HOUR1_FIELD: // 'h'
position = new ParsePosition(offset);
代码示例来源:origin: MobiVM/robovm
return parseText(string, offset, formatData.eras, Calendar.ERA);
case YEAR_FIELD:
if (count >= 3) {
break;
case AM_PM_FIELD:
return parseText(string, offset, formatData.ampms, Calendar.AM_PM);
case HOUR1_FIELD: // 'h'
position = new ParsePosition(offset);
代码示例来源:origin: com.gluonhq/robovm-rt
return parseText(string, offset, formatData.eras, Calendar.ERA);
case YEAR_FIELD:
if (count >= 3) {
break;
case AM_PM_FIELD:
return parseText(string, offset, formatData.ampms, Calendar.AM_PM);
case HOUR1_FIELD: // 'h'
position = new ParsePosition(offset);
代码示例来源:origin: com.bugvm/bugvm-rt
return parseText(string, offset, formatData.eras, Calendar.ERA);
case YEAR_FIELD:
if (count >= 3) {
break;
case AM_PM_FIELD:
return parseText(string, offset, formatData.ampms, Calendar.AM_PM);
case HOUR1_FIELD: // 'h'
position = new ParsePosition(offset);
内容来源于网络,如有侵权,请联系作者删除!