Skip to content

Commit

Permalink
fix: replace -> replaceAll
Browse files Browse the repository at this point in the history
  • Loading branch information
scolastico committed Apr 25, 2024
1 parent eea8a9c commit b5c37ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ms-ics-fix/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ async function doIcsFix(url) {
const d = new Date(t)
return d
.toISOString()
.replace('-', '')
.replace(':', '')
.replaceAll('-', '')
.replaceAll(':', '')
.substring(0, 15) + 'Z'
} catch (ignored) {}
return '19700101T000000Z'
Expand All @@ -77,9 +77,9 @@ async function doIcsFix(url) {
`UID:${event.uid}`,
`DTSTART:${getTime(event.start)}`,
`DTEND:${getTime(event.end)}`,
`STATUS:${(event.status || '').toString().replace('\n', ' ')}`,
`LOCATION:${(event.location || '').toString().replace('\n', ' ')}`,
`SUMMARY:${(event.summary || '').toString().replace('\n', ' ')}`,
`STATUS:${(event.status || '').toString().replaceAll('\n', ' ')}`,
`LOCATION:${(event.location || '').toString().replaceAll('\n', ' ')}`,
`SUMMARY:${(event.summary || '').toString().replaceAll('\n', ' ')}`,
`END:VEVENT`
].join('\n'))
}
Expand Down

0 comments on commit b5c37ea

Please sign in to comment.