we kann man eine datumseingabe wie diese: 10.03.2003 in eine long umwandeln?
Hobbit_Im_Blutrausch hat gesagt.:ok, es geht manuell ist aber doch ein wenig komplexer (war vorhin irgendwie bei ner Uhrzeit ) ... so wie GreogrianCalendar das eben macht.
/**
* Converts calendar field values to the time value (millisecond
* offset from the [url="Calendar.html#Epoch"]Epoch[/url]).
*
* @exception IllegalArgumentException if any calendar fields are invalid.
*/
protected void computeTime() {
// In non-lenient mode, perform brief checking of calendar
// fields which have been set externally. Through this
// checking, the field values are stored in originalFields[]
// to see if any of them are normalized later.
if (!isLenient()) {
if (originalFields == null) {
originalFields = new int[FIELD_COUNT];
}
for (int field = 0; field < FIELD_COUNT; field++) {
int value = internalGet(field);
if (isExternallySet(field)) {
// Quick validation for any out of range values
if (value < getMinimum(field) || value > getMaximum(field)) {
throw new IllegalArgumentException(getFieldName(field));
}
}
originalFields[field] = value;
}
}
Das glaubst aber nur du!byto hat gesagt.:Das geht schon, aber es macht halt niemand freiwillig zu fuß! :bae: