Add #tolong function and corrected target framework issues#225
Open
danwale wants to merge 3 commits intoWorkMaze:masterfrom
Open
Add #tolong function and corrected target framework issues#225danwale wants to merge 3 commits intoWorkMaze:masterfrom
danwale wants to merge 3 commits intoWorkMaze:masterfrom
Conversation
Contributor
|
Compiling with .net6.0 was already 'pull requested' in #209 |
Courela
approved these changes
Mar 28, 2022
Author
|
Yes, I just needed to repeat it because I couldn't work on the solution with that merge not completed, I didn't want to commit my changes and raise a pull request with a branch I knew wasn't working in its own right. But all good if these end up in the mainline soon. |
…er than Int32.MaxValue which previously returned 0.
…as .NET 6.0 so that the library can be used with non .NET core projects.
This file contains hidden or 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
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.
I added in the function #tolong to value that is larger than Int32.MaxValue to a whole number value.
I know I could have added this as a custom function but it seems like a simple change that others would benefit from.
I've added in the unit test for the function and have tested that it works as I'd expect.
My use case was I have a value that has time in seconds since EPOCH with 3 decimal places that I needed to multiply by 1000 to get to be milliseconds since epoch then I needed to convert it to a whole number, #round using 0 decimal places still returns a decimal value as well. The only workaround that wasn't ideal was to use substring and take the first 13 characters trimming off the .0 value but that then also converts the number to a string value.
I found the projects were targeting a non existent target framework of .net6.0-windows8.0, in order to work with the project I had to fix these values so that it was netstandard2.0 for the JUST.net and ExternalMethods projects but .NET 6.0 for the unit test projects. This will allow the class library to work with .NET Framework and .NET (Core) projects without issue. I've only bundled the two changes together because it was impossible to use the original target framework the projects had.