-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implement PlainTime #25
Conversation
- toString() - from() - compare() - add() - subtract()
From failing tests log, seems FP rounding error
How should we handle floating-point rounding errors? |
Such imprecise rarely happens in |
- Failing due to FP imprecision in AS - ColinEberhardt#25 (comment)
Apply suggestions from code review Co-authored-by: Max Graey <maxgraey@gmail.com>
Co-authored-by: Max Graey <maxgraey@gmail.com>
- rejectTime() yet to be implemented
make them more close to tc39 implementation
@MaxGraey shouldn't it be 8 instead of 4 in assemblyscript-temporal/assembly/utils.ts Lines 177 to 181 in 1d02f91
|
right! Good catch! |
Also while working on I will create an issue for it shortly |
Should I add a commit for it in this PR ? |
I already made PR with fix: #28 |
see https://github.com/ColinEberhardt/assemblyscript-temporal/pull/25/files#r607097375 Apply suggestions from code review Co-authored-by: Max Graey <maxgraey@gmail.com>
assemblyscript-temporal/assembly/duration.ts Lines 71 to 78 in 1d02f91
@MaxGraey is there a way to remove the trailing From CI logs https://github.com/ColinEberhardt/assemblyscript-temporal/runs/2270205795
|
Trailing zero for serialized f64/f32 strings is a deliberate decision and convention of AssemblyScript which differ from JS/TS. So I suggest slightly modify original tests and add |
I think this PR is good to go now! |
Another option: function stringify(value: f64): string {
return F64.isSafeInteger(value) ? i64(value).toString() : value.toString();
} |
This reverts commit 65b6837.
This is great! With this |
Thank you - great work 👍 |
🎉 This PR is included in version 1.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Part of #21
Other fixes include in PR