Skip to content
Discussion options

You must be logged in to vote

Hey @AnujNayak108, great to have you, and good point here. There are definitely a bunch of things like this across our active repos that we'll be looking to hunker down in the new year and weed out the... less ideal patterns, and untestable elements. 😁

Your suggestion makes total sense, and seems fairly self-contained as an implementation change as I see it (though I haven't looked for all the usages of the function), so by all means pop a PR up with an amended function that splits the logic out in this way with a new (default) now() parameter if you'd like!
I agree, this would be much easier to reason with firm test cases, and presume this was added in at some point to solve an immediate…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AnujNayak108
Comment options

Answer selected by AnujNayak108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants