forked from alamkanak/Android-Week-View
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert back to using builder pattern
This is more extensible for the date library modules.
- Loading branch information
Showing
11 changed files
with
164 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
jodatime/src/main/java/com/alamkanak/weekview/jodatime/DurationExtensions.kt
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
jodatime/src/main/java/com/alamkanak/weekview/jodatime/WeekViewItemBuilderExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.alamkanak.weekview.jodatime | ||
|
||
import com.alamkanak.weekview.WeekViewItem | ||
import org.joda.time.LocalDate | ||
import org.joda.time.LocalDateTime | ||
|
||
fun WeekViewItem.Builder.setAllDayDuration(date: LocalDate): WeekViewItem.Builder { | ||
return setAllDayDuration(date.toCalendar()) | ||
} | ||
|
||
fun WeekViewItem.Builder.setBoundedDuration( | ||
startTime: LocalDateTime, | ||
endTime: LocalDateTime, | ||
): WeekViewItem.Builder { | ||
return setBoundedDuration(startTime.toCalendar(), endTime.toCalendar()) | ||
} |
35 changes: 0 additions & 35 deletions
35
jsr310/src/main/java/com/alamkanak/weekview/jsr310/DurationExtensions.kt
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
jsr310/src/main/java/com/alamkanak/weekview/jsr310/WeekViewItemBuilderExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.alamkanak.weekview.jsr310 | ||
|
||
import com.alamkanak.weekview.WeekViewItem | ||
import java.time.LocalDate | ||
import java.time.LocalDateTime | ||
|
||
fun WeekViewItem.Builder.setAllDayDuration(date: LocalDate): WeekViewItem.Builder { | ||
return setAllDayDuration(date.toCalendar()) | ||
} | ||
|
||
fun WeekViewItem.Builder.setBoundedDuration( | ||
startTime: LocalDateTime, | ||
endTime: LocalDateTime, | ||
): WeekViewItem.Builder { | ||
return setBoundedDuration(startTime.toCalendar(), endTime.toCalendar()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.