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 ms into full days, hours, minutes, seconds, milliseconds #196

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dan-stowell
Copy link

We want our tools to be able to display exact times instead of rounded times. This pull request adds a new option, allUnits, that includes days, hours, minutes, seconds, and milliseconds in formatted output.

I am open to alternative naming or organization! I just want to be able to render exact build times:

CleanShot 2023-04-08 at 15 16 50@2x

Copy link

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic looks sounds. mainly focused on test cases being correct. Add some odd numbers and a prime or two and i think you'll be all set

@@ -198,6 +198,177 @@ describe('ms(number, { long: true })', () => {
});
});

// numbers all units

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some test cases for odd numbers? Also, maybe a prime number or so? This will add confidence to your algorithm for determining the splits.

@styfle styfle requested a review from mrmckeb April 13, 2023 13:32
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.

None yet

2 participants