Skip to content

Commit

Permalink
Allow dates with single digit
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Nov 24, 2019
1 parent d781ba4 commit 56dcd53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imap-core/lib/imap-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ module.exports.validateInternalDate = internaldate => {
if (!internaldate || typeof internaldate !== 'string') {
return false;
}
return /^([ \d]\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{4}) (\d{2}):(\d{2}):(\d{2}) ([-+])(\d{2})(\d{2})$/i.test(internaldate);
return /^([ \d]?\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{4}) (\d{2}):(\d{2}):(\d{2}) ([-+])(\d{2})(\d{2})$/i.test(internaldate);
};

module.exports.validateSearchDate = internaldate => {
Expand Down

0 comments on commit 56dcd53

Please sign in to comment.