-
Notifications
You must be signed in to change notification settings - Fork 275
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
Add formatNumber, parseEpoch and parseTicks. #2198
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull Request Test Coverage Report for Build 128992
💛 - Coveralls |
boydc2014
reviewed
May 7, 2020
Switch ticks to bigInt. Add tests.
…ilder-js into shuwan/formatNum
boydc2014
approved these changes
May 7, 2020
boydc2014
pushed a commit
that referenced
this pull request
May 7, 2020
* Add formatNumber, parseEpoch and parseTicks. * Switch to ESNext like other packages. Switch ticks to bigInt. Add tests. Co-authored-by: Shuai Wang <shuwan@microsoft.com>
boydc2014
added a commit
that referenced
this pull request
May 7, 2020
* [PORT] [Expression] Add more timex builtin functions (#2187) * add more timex function * fix typo * fix typo * Add formatNumber, parseEpoch and parseTicks. (#2198) * Add formatNumber, parseEpoch and parseTicks. * Switch to ESNext like other packages. Switch ticks to bigInt. Add tests. Co-authored-by: Shuai Wang <shuwan@microsoft.com> Co-authored-by: Hongyang Du (hond) <hond@microsoft.com> Co-authored-by: Chris McConnell <chrimc@microsoft.com> Co-authored-by: Shuai Wang <shuwan@microsoft.com>
Stevenic
added a commit
that referenced
this pull request
May 8, 2020
* Add Dialog / PageView telemetry (#2145) * Update app insights package version * Add PageView logging * move TelemetryView helper to botTelemetryClient.ts * remove telemetry Extensions class, harden helper method, add tests Co-authored-by: Steven Gum <14935595+stevengum@users.noreply.github.com> * move botbuilder-lg and adaptive-expressions out of preview (#2190) * move botbuilder-lg and adaptive-expressions out of preview * correct set-version script in preview packages * restore preview packages to using Version instead of PreviewPackageVersion * Fixed issues with AdaptiveSkillDialog (#2196) and added unit tests * [Cherry-pick] timex and formatX functions (#2200) * [PORT] [Expression] Add more timex builtin functions (#2187) * add more timex function * fix typo * fix typo * Add formatNumber, parseEpoch and parseTicks. (#2198) * Add formatNumber, parseEpoch and parseTicks. * Switch to ESNext like other packages. Switch ticks to bigInt. Add tests. Co-authored-by: Shuai Wang <shuwan@microsoft.com> Co-authored-by: Hongyang Du (hond) <hond@microsoft.com> Co-authored-by: Chris McConnell <chrimc@microsoft.com> Co-authored-by: Shuai Wang <shuwan@microsoft.com> * Updated packages to target ES6 (#2204) * Switch adaptive-expressions to es6 (#2205) * Drop back to es5 and add bigint support. * Fix test script. * Fix test script. * Remove adaptive. * Remove space. * Remove changes to package.json. * update adaptive-expressions target to es5 for initial testing * Push es5. Co-authored-by: stevengum <14935595+stevengum@users.noreply.github.com> * Renamed AdaptiveSkillDialog to BeginSkillDialog (#2212) * Renamed BeginSkill action again (#2215) * Renamed BeginSkill action again * update component registration Co-authored-by: Gary Pretty <gary@garypretty.co.uk> Co-authored-by: Steven Gum <14935595+stevengum@users.noreply.github.com> Co-authored-by: Dong Lei <donglei@microsoft.com> Co-authored-by: Hongyang Du (hond) <hond@microsoft.com> Co-authored-by: Chris McConnell <chrimc@microsoft.com> Co-authored-by: Shuai Wang <shuwan@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2189
Description
Refers to the first question in microsoft/botbuilder-dotnet#3873
formatNumber(num1, num2), takes two arguments, the first one should be a numeric value, and the second one should be an integer. The returned value is a string
Examples
formatNumber(12.123, 2) = "12.12"
formatNumber(20, 2) = "20.00"
formatNumber(1.555, 2) = "1.56"
formatNumber(12.123, 4) = "12.1230"
Added formatEpoch and formatTicks.
formatEpoch(1521118800) -> 2018-03-15T13:00:00.000Z
formatTicks(637243624200000000) -> 2020-05-06T11:47:00.000Z
Removed ticks functionality from formatDateTime.