Repository navigation
Fixed to/from toml date format - #11846
Merged
Merged
Conversation
…t rcf3339 dates to nushell ones and vice versa
fdncred
reviewed
Feb 13, 2024
fdncred
reviewed
Feb 13, 2024
fdncred
requested changes
Feb 13, 2024
fdncred
left a comment
Contributor
There was a problem hiding this comment.
Thanks for this PR. It seems like a pretty small change. For your first rust PR I'd like to say, good job! There are just a few minor changes that I think we need.
It would also be good to have a test in order to ensure this functionality continues to work as other people make changes.
Co-authored-by: Darren Schroeder <[email protected]>
fdncred
reviewed
Feb 13, 2024
Contributor
Author
|
I've added tests for both commands now. Also I removed the |
fdncred
reviewed
Feb 13, 2024
Contributor
|
Thanks! |
dmatos2012
pushed a commit
to dmatos2012/nushell
that referenced
this pull request
Feb 20, 2024
With this PR i try to resolve nushell#11751 # Description I am rather new to Rust so if anything is not the way it should be please let me know. As described in the title I just fixed the date conversion in the to and from toml commands as i thought it would be a good first issue. The example of the original issue will now work as follows: ``` ~> {date: 2024-02-02} | to toml date = "2024-02-02T00:00:00+00:00" ~> "dob = 1979-05-27T07:32:00-08:00" | from toml ╭─────┬───────────────────────────╮ │ dob │ 44 years ago | ╰─────┴───────────────────────────╯ ``` The `from toml` command now returns a nushell date which is displayed as `44 years ago` in this case. # User-Facing Changes none # Tests + Formatting all tests pass and formatting has been applied --------- Co-authored-by: dannou812 <[email protected]> Co-authored-by: Darren Schroeder <[email protected]>
kik4444
pushed a commit
to kik4444/nushell-fork
that referenced
this pull request
Feb 28, 2024
With this PR i try to resolve nushell#11751 # Description I am rather new to Rust so if anything is not the way it should be please let me know. As described in the title I just fixed the date conversion in the to and from toml commands as i thought it would be a good first issue. The example of the original issue will now work as follows: ``` ~> {date: 2024-02-02} | to toml date = "2024-02-02T00:00:00+00:00" ~> "dob = 1979-05-27T07:32:00-08:00" | from toml ╭─────┬───────────────────────────╮ │ dob │ 44 years ago | ╰─────┴───────────────────────────╯ ``` The `from toml` command now returns a nushell date which is displayed as `44 years ago` in this case. # User-Facing Changes none # Tests + Formatting all tests pass and formatting has been applied --------- Co-authored-by: dannou812 <[email protected]> Co-authored-by: Darren Schroeder <[email protected]>
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.
With this PR i try to resolve #11751
Description
I am rather new to Rust so if anything is not the way it should be please let me know.
As described in the title I just fixed the date conversion in the to and from toml commands as i thought it would be a good first issue. The example of the original issue will now work as follows:
The
from tomlcommand now returns a nushell date which is displayed as44 years agoin this case.User-Facing Changes
none
Tests + Formatting
all tests pass and formatting has been applied