Comments (6)
Do you see any issues when using the library ? This method is used internally and might actually need it to return 242.
from android-week-view.
Yes, I had a bug therefore I digged in and got to the method.
In order to produce this case naturally:
The date of the device should be 08/09/2017(GMT +3), Then use method WeekView.goToDate('01/01/2017') (GMT +2) - This is actually a test case that we have.
The weekview should go to a day prior to the given date.
from android-week-view.
Ok, can you create a PR for this and use your own test to check if it is fixed ? We currently don't have a testing framework, any suggestions ?
from android-week-view.
@eranf91 Do you mean 01/09/2017 GMT+3 instead of 08/09/2017 GMT+3 ?
from android-week-view.
- I will open a pull a request
- I think you should consider start work with joda time, it is a simply better library then joda time (and as far for java 8 it is come with it)
- Thats means that you should start by adding a gradle depedency to joda time (since android is not running on JDK8)
- I Think that the coorect method: WorkWeekUtils.daysBetween should be:
Days.daysBetween(new DateTime(dateOne), new DateTime(dateTwo)).getDays(); - I think it is required to write jUnits for this method since that there are to many cases to test
- I did not mean instead, I ment that for these to values the method return invalid value
from android-week-view.
I changed it to
return (int) (((dateTwo.getTimeInMillis() + dateTwo.getTimeZone().getOffset(dateTwo.getTimeInMillis())) / (1000 * 60 * 60 * 24)) -
((dateOne.getTimeInMillis() + dateOne.getTimeZone().getOffset(dateOne.getTimeInMillis())) / (1000 * 60 * 60 * 24)));
}
for now.
The unit tests would indeed be quite helpfull.
from android-week-view.
Related Issues (20)
- Bug with goToHour method when time range is set HOT 3
- Serious bug in viewing events : not showing all events that are given HOT 1
- Bug: adding full day WeekViewEvent with same startDate and endDate results in single cell HOT 1
- Event not drawing on 31st day of month HOT 2
- Events Not loading after asynchronous call
- On Load scroll to current time, not 12am HOT 1
- disable fling doesn't seem to work correctly HOT 1
- Crash issue
- Enchanced : customize the date format
- Preview Render Problems HOT 1
- Add Event Dynamically HOT 3
- Crashes on API 28
- doesnt shows anything any help HOT 1
- Needs to Click the gototoday before showing all the events
- How to implement a multi-line String on header date
- Drag and Drop feature on marked Events HOT 3
- 动态添加event 一直返回
- Event title vertical alignment
- Multiple events on same day not showing
- is it possible to turn off zoom?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-week-view.