Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dealing with various date formats #253

Open
anderspeders opened this issue Jun 1, 2017 · 1 comment
Open

Dealing with various date formats #253

anderspeders opened this issue Jun 1, 2017 · 1 comment

Comments

@anderspeders
Copy link

The current database holds disclosures marked by YYYY only but not on specific time series: DD-MM-YYYY.

How should we accomodate data collection on various formats?

Should we aim to collect start date and end date for each disclosure or would YYYY (based on start date or end date) be sufficient?

@anderspeders anderspeders changed the title Dealing with various time formats Dealing with various date formats Jun 1, 2017
@mattfullerton
Copy link
Contributor

mattfullerton commented Jun 6, 2017

From a quick look through the code it looks like hold full dates for everything except production and payments. It could well be that we only display dates in some cases because the month/day info is perceived to be inaccurate. For example this fact is true on 1st January at 1am:
http://resourceprojects.org/project/pe-las%20-5k6jsk - actually a place where we shouldn't be showing the month/day/time.

The extremely correct solution would be to mark all dates with an accuracy flag as far down as day (hour/minute seems overkill) and then display them accordingly.

For disclosures specifically, we are showing full dates:
http://resourceprojects.org/sources
http://resourceprojects.org/source/585bb9e68bb3aa000f212101

And then there are probably silly things like setting the source date of a report to be that of when we download it:
https://github.com/NRGI/ResourceProjects.org/blob/master/server/dataprocessing/companieshouse.js#L743 😊

In terms of dealing with various time formats, the import tries hard:
https://github.com/NRGI/ResourceProjects.org/blob/master/server/dataprocessing/googlesheets.js#L105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants