-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added date validation #93
Conversation
Cool idea, it looks good on first sight, but I'll do a proper review tonight. Could you fix CI in the meantime? |
src/form.ts
Outdated
const ctx = await this.conversation.wait(); | ||
const text = ctx.msg?.text ?? ctx.msg?.caption ?? ""; | ||
let date = new Date(text); | ||
if(date === "Invalid Date") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comparison looks sketchy, though, are you sure that dates work like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed converting date
to a string
Please revert that fix. You committed a pnpm lock file and reformatted the entire project. If you do not have Deno installed or are unsure how to fix up CI, just drop me a comment and I can fix it up :) |
4f4427d
to
1a5426b
Compare
Installed Deno and reverted. I cannot get format-and-lint to work without modifying the whole file with |
I can fix it up later today |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #93 +/- ##
==========================================
- Coverage 95.83% 94.60% -1.23%
==========================================
Files 4 4
Lines 840 853 +13
Branches 124 124
==========================================
+ Hits 805 807 +2
- Misses 33 44 +11
Partials 2 2 ☔ View full report in Codecov by Sentry. |
Oh nice, you got it already |
Do I need to do anything else? |
it seems the job is still failing. @KnorpelSenf do you wanna take a look at it? |
Added Date validation to the Form class.
Valid syntax defined here