Skip to content

Commit

Permalink
Handle spaces in sources years
Browse files Browse the repository at this point in the history
  • Loading branch information
kremio committed Dec 9, 2018
1 parent 6bbb237 commit e863ca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/report.js
Expand Up @@ -83,7 +83,7 @@ module.exports = async ( url ) => {
.map((source) => {
const [name, dateDDMMYYYY] = source.split(', ')
if( dateDDMMYYYY ){
const [day, month, year] = dateDDMMYYYY.split('.')
const [day, month, year] = dateDDMMYYYY.split('.').map((str) => str.trim())
return {
name,
publishedDate: new tc.DateTime( `${year}-${month.padStart(2,'0')}-${day.padStart(2,'0')}T00:00${TIMEZONE}` ).toIsoString()
Expand Down

0 comments on commit e863ca1

Please sign in to comment.