-
Notifications
You must be signed in to change notification settings - Fork 103
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
adding helper function to create a timestamp #583
adding helper function to create a timestamp #583
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
Codecov Report
@@ Coverage Diff @@
## main #583 +/- ##
==========================================
- Coverage 97.81% 97.69% -0.12%
==========================================
Files 66 66
Lines 7964 7987 +23
Branches 1157 1155 -2
==========================================
+ Hits 7790 7803 +13
- Misses 168 178 +10
Partials 6 6
|
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.
Does the method allow for calling with no parameters and returning an auto-generated timestamp too?
@csuwildcat currently no. There is another helper method |
@csuwildcat when you say auto-generated do you mean of the current time as @flothjl mentioned or a random timestamp for testing? We do have a crude https://github.com/TBD54566975/dwn-sdk-js/blob/main/tests/utils/test-data-generator.ts#L834-L844 |
I meant getting the current time in this format. I know the records create/update code does this automatically if omitted, just might be worth it exposing auto-generated/- filled timestamps if you call with no params or less than full params. Could be a waste of time though, because the most important thing is just having a function to cast values into the right format. |
@csuwildcat ah yeah, in that case I think keeping the current |
@LiranCohen good call out on |
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.
🙏 🔥 🎖️
Addresses #570