Skip to content
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

Format numbers used in views #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

StephenWeber
Copy link

Builds on @DrYoshiyahu formatting to always present formatted numbers, and in one case preserving the number where it is used for calculations (but not shown to user). Addresses lukeleppan#103 and lukeleppan#111

This is not the best organization/naming, but it compiles and works as expected.

Screenshot showing Total Pages (tp) and Words per Day (wpd) that are properly rounded.
Screenshot 2024-02-13 at 8 23 53 AM

Screenshot showing Current Pages (p) and Total Pages (ppd) that are properly rounded.
Screenshot 2024-02-13 at 8 23 43 AM

DrYoshiyahu and others added 2 commits November 20, 2023 20:00
Wrote a new function (formatNumber) that removes floating point errors and adds thousands separators to a number, and applied this function to the results of most numeric variables sent to StatusBar.ts
@StephenWeber
Copy link
Author

Just checking in to say that I've been using this updated version for the past week and am happy with the results. Numbers just look correct for the context!

@joseph-allen
Copy link

Can we merge this already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants