nushell/crates/nu-command/src/formats/from
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 Fix panic in rotate; Add safe record creation function (#11718) 2024-02-03 13:23:16 +02:00
json.rs Strict JSON parsing (#11592) 2024-01-30 08:10:19 -06:00
mod.rs REFACTOR: move the 0% commands to nu-cmd-extra (#9404) 2023-07-06 08:31:31 -07:00
nuon.rs Prevent duplicate records keys when decoding from nuon (#11807) 2024-02-13 23:59:14 +00:00
ods.rs update deps calamine and quick-xml (#11582) 2024-01-19 12:23:51 -06:00
ssv.rs Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02: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
xlsx.rs update deps calamine and quick-xml (#11582) 2024-01-19 12:23:51 -06:00
xml.rs Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
yaml.rs Move more commands to opaque Record type (#11122) 2023-11-22 23:48:48 +01:00