Closed billimarie closed 6 years ago
Is this done ? because i can see in the website dates are properly there? or am i looking at the wrong section
Also could you tell me in which format do you have in your database? so i can convert it properly
Hi @M-ZubairAhmed, thanks for checking it out.
Each attorney entry in the database is formatted in JSON:
{
"_id": {
"$oid": "5919ed1c734d1d1cd0be9d88"
},
"attorney-id": "ua-al-m",
"name": "A. Clark Morris",
"role": "U.S. Attorney",
"state": "Alabama",
"district": "Middle District of Alabama",
"appointed": "2017-03-11"
}
As you'll notice, the "appointed date" is just a string. Hopefully this can be changed so that in the future, a user will be able to use the app to filter through dates. If you have an idea of how to do this, please feel free to submit a pull request.
I'll see if I can figure it out...
Hey, i'd be interested in doing this. Where is the json located?
In api/data/usAttorneys.js I changed the "appointed" date to be a unix time stamp so that it would be easier to sort. In client/templates/sections/current-prosecutors.html I updated the appointed section to display month-day-year. When I open up localhost:3000 I am not able to see anything.
Thanks for the assistance, everyone. Closing out thanks to @Thai56's pull-request: #31
re: appointed date (see US Attorneys)
Convert .json dates to human-friendly
month day, year
format (conversely: change .json dates to human-friendly format. potential issue: organization)