Categories
meetings Scraping

Thread’s date issue when selecting days in different months, suggestions?

After the user creates a thread, he selects starting date and end date which could span on more than one month. The problem is that the scraping script works on one month at a time, because I’ve found a difficulty to write a method that can take the start and end date in different months and calculated the number of days between them. Because of that the days at each month changes from one year to another, that doesn’t mean it’s impossible to do, but it will add some complexity which can be avoid by, asking the user for starting day and end day for each month individuality, and run the script for each individual month.

So any suggestions on how to make this part more easy and conveniente?

issues_dates is the method which calculate the dates and return an array of the dates in this format “YYYY/MM/DD”

Look at the code of this script at https://gist.github.com/2925910

2 replies on “Thread’s date issue when selecting days in different months, suggestions?”

Hey ahmd, from a UI perspective, ideally the user selects start and end dates by either typing in the date or selecting from a calendar that comes up in a modal box. Think of airplane reservations.

Also: we should consider the use case where a user is following a current story, so they want to leave the end date open and continue grabbing the new front pages each day?

re: UI
In the Data model http://montera34.org/pageonex/2012/06/22/pageonex-initial-data-model/ we already considered the “open thread” option: “open thread will add newspapers every date (will change end date) but should have a limit”.

I’ve using Piwik (web analytics) frequently, and it’s good the way you can select certain period of time within your thread start-end dates, and select different pages to track (in our case would be newspapers). Check Piwik demo: http://demo.piwik.org/index.php?module=CoreHome&action=index&idSite=7&period=day&date=yesterday
We also should consider providing bar chart / line chart option in visualization, and incorporate the use of sparklines.

Comments are closed.