BrightSide Workbench Full Report + Source Code
org.turro.timetracker.AssignHoursModel Class Reference

Public Member Functions

void assignFrom (TimeTracker tt)
 
double getFrom (TimeTracker tt)
 
boolean isValid ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 30 of file AssignHoursModel.java.

Member Function Documentation

◆ assignFrom()

void org.turro.timetracker.AssignHoursModel.assignFrom ( TimeTracker  tt)

Definition at line 34 of file AssignHoursModel.java.

34  {
35  this.tt = tt;
36  }

◆ getFrom()

double org.turro.timetracker.AssignHoursModel.getFrom ( TimeTracker  tt)

Definition at line 38 of file AssignHoursModel.java.

38  {
39  Duration total = Duration.ofMinutes(ChronoUnit.MINUTES.between(this.tt.getLocalDateTime(), tt.getLocalDateTime()));
40  return total.toHours() + Round.from(total.toMinutesPart() * 0.016666).decimals(2).value();
41  }
Here is the call graph for this function:

◆ isValid()

boolean org.turro.timetracker.AssignHoursModel.isValid ( )

Definition at line 43 of file AssignHoursModel.java.

43  {
44  return tt != null;
45  }

The documentation for this class was generated from the following file: