Campbell Ritchie wrote:Surely end would be 2017-10-30...
I am not sure there is anything helpful in the Java™ Tutorials about that. Have you been through the methods of Duration, LocalDateTime and Period to see whether it says anything about weekends? You realise you can get the day of week (Sunday, Monday, Tuesday) from a local date easily enough?
Jeanne Boyarsky wrote:You've got step one. You know the total number of hours. Next you need to find the total number of weekend hours.
For that, you'll need some logic. Any thoughts on how to tell if a day is a weekend? Or how to go through all the dates in the range?
Henry Wong wrote:
There are already services that does this for you -- so, this will be a lot of work for something that already exists... but to answer your question, you will have to write code to measure it, which means...
1. You will need a server with really good upload/download speed. Arguably, ridiculously good upload/download speed. It needs to be much faster than your clients, or you will be measuring the speed of the server (and not the client).
2. You need to take lots of measurements -- so, this will take a lot of time. Additionally, you will need a good understanding of statistics too (which is true when you want to have valid data of anything that is measured).
... and ...
3. The process itself is simply sending lots and lots of data. There will be time stamps in this data. And it is simply a matter of looking at the time stamps as you are counting the amount of data. This needs to be done in both directions obviously.