Skip to content

Commit

Permalink
Fix for datetime building
Browse files Browse the repository at this point in the history
  • Loading branch information
emi420 committed Jan 9, 2025
1 parent 20b17ca commit 354ba0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parsers/whatsapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const parseTimeString = (dateStr) => {
dateTimeStr = dateTimeStr.replace("a.m.", "AM").replace("p.m.", "PM")
let dateTime = dateTimeStr.split(" ");
const now = new Date();
let fmtDate = [[now.getFullYear(), now.getMonth(), now.getDay()].join("/"), dateTime[1]].join(" ")
let fmtDate = [[now.getFullYear(), now.getMonth() + 1, now.getDate()].join("/"), dateTime[1]].join(" ")
return new Date(fmtDate);
}

Expand Down

0 comments on commit 354ba0a

Please sign in to comment.