nushell/crates/nu-command/src/formats/to
dannou812 b0600449e5
Fixed to/from toml date format (#11846)
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:

```
~> {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 <dannou281@gmail.com>
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2024-02-14 12:13:33 -06:00
..
command.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
csv.rs Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
delimited.rs Use Record::get instead of Value functions (#10925) 2023-11-08 21:47:37 +01:00
json.rs do not attempt to glob expand if the file path is wrapped in quotes (#11569) 2024-01-21 23:22:25 +08:00
md.rs Replace htmlescape with v_htmlescape (#11572) 2024-01-18 12:58:35 -06:00
mod.rs REFACTOR: move the 0% commands to nu-cmd-extra (#9404) 2023-07-06 08:31:31 -07:00
nuon.rs do not attempt to glob expand if the file path is wrapped in quotes (#11569) 2024-01-21 23:22:25 +08:00
text.rs do not attempt to glob expand if the file path is wrapped in quotes (#11569) 2024-01-21 23:22:25 +08:00
toml.rs Fixed to/from toml date format (#11846) 2024-02-14 12:13:33 -06:00
tsv.rs Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
xml.rs Add self-closed tag support for to xml (#11577) 2024-01-19 05:35:29 -06:00
yaml.rs do not attempt to glob expand if the file path is wrapped in quotes (#11569) 2024-01-21 23:22:25 +08:00