year += 1900;
if (year < 2000 || month > 12 || day > 31) {
throw new IllegalArgumentException("Invalid record date "+year+"-"+month+"-"+day);
}
steps = (data[2] & 0xFF) * 256 + (data[1] & 0xFF);
<BUG>distance = (data[4] & 0xFF) * 256 + (data[3] & 0xFF);
</BUG>
activeTime = (data[14] & 0xFF) * 256 + (data[13] & 0xFF);
calories = (data[6] & 0xFF) * 256 + (data[5] & 0xFF);
calories += (data[8] & 0xFF) * 256 + (data[7] & 0xFF);

year += 1900;
if (year < 2000 || month > 12 || day > 31) {
throw new IllegalArgumentException("Invalid record date "+year+"-"+month+"-"+day);
}
steps = (data[2] & 0xFF) * 256 + (data[1] & 0xFF);
distance = ((data[4] & 0xFF) * 256 + (data[3] & 0xFF)) * 10;
activeTime = (data[14] & 0xFF) * 256 + (data[13] & 0xFF);
calories = (data[6] & 0xFF) * 256 + (data[5] & 0xFF);
calories += (data[8] & 0xFF) * 256 + (data[7] & 0xFF);
