Skip to content

DayTime

Jean Luis Urena edited this page Aug 20, 2018 · 1 revision

DayTime

DayTime is an object that with Time (LocalTime) and Day (DayOfWeek) attributes. Both objects are from Jake Wharton's ThreeTenABP, a backport of Java 8 Time package to support a minimum SDK version of 22. It is a major use in WeekViewEvents and required to create a WeekViewEvent objects.

The timezone of the application is initialized in the constructor of WeekView using the Application's Context therefore ThreeTenABP is not needed in the client app to use this library. DayTime also has multiple constructors that do not require ThreeTen's BackPort or java.time.

For instance, a DayTime Object can be instantiated with:

DayTime dayTime = new DayTime(1, 12, 0); // Monday 12:00PM

DayTime also supports changing the time and day with either addDays(int days) addHours(int hours) ... etc. Have a look at the source DayTime.java.


For reference, these are the days of the week represented by integers.

  • Monday - 1
  • Tuesday - 2
  • Wednesday - 3
  • Thursday - 4
  • Friday - 5
  • Saturday - 6
  • Sunday - 7
Clone this wiki locally