Skip to content

Commit

Permalink
Fix date formating
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronClaydon committed Apr 8, 2024
1 parent c4c7b66 commit 4ecce78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export default {
let hours = this.padToTwo(datetime.getHours())
let minutes = this.padToTwo(datetime.getMinutes())

const regex = /\d{4}-\d{2}-\d{2}T(\d{2}):(\d{2}):(\d{2})Z/;
console.log(datetimeString)

const regex = /\d{4}-\d{2}-\d{2}T(\d{2}):(\d{2}):(\d{2})(Z|\+\d{2}:\d{2})/;
let regexMatch = datetimeString.match(regex)

if (regexMatch) {
Expand Down

0 comments on commit 4ecce78

Please sign in to comment.