Lines Matching defs:fraction
216 long fraction = date.getTimeOfDay();
217 if (fraction != CalendarDate.TIME_UNDEFINED) {
218 return fraction;
220 fraction = getTimeOfDayValue(date);
221 date.setTimeOfDay(fraction);
222 return fraction;
226 long fraction = date.getHours();
227 fraction *= 60;
228 fraction += date.getMinutes();
229 fraction *= 60;
230 fraction += date.getSeconds();
231 fraction *= 1000;
232 fraction += date.getMillis();
233 return fraction;
236 public CalendarDate setTimeOfDay(CalendarDate cdate, int fraction) {
237 if (fraction < 0) {
241 int time = fraction;
252 cdate.setTimeOfDay(fraction);
375 long fraction = getTimeOfDay(date);
378 if (fraction >= DAY_IN_MILLIS) {
379 days = fraction / DAY_IN_MILLIS;
380 fraction %= DAY_IN_MILLIS;
381 } else if (fraction < 0) {
382 days = CalendarUtils.floorDivide(fraction, DAY_IN_MILLIS);
384 fraction -= DAY_IN_MILLIS * days; // mod(fraction, DAY_IN_MILLIS)
388 date.setTimeOfDay(fraction);
390 date.setMillis((int)(fraction % 1000));
391 fraction /= 1000;
392 date.setSeconds((int)(fraction % 60));
393 fraction /= 60;
394 date.setMinutes((int)(fraction % 60));
395 date.setHours((int)(fraction / 60));