nushell/crates/nu-command/src/formats/to
Andrej Kolchin 2d0a60ac67
Use native toml datetime type in to toml (#13018)
# Description

Makes `to toml` use the `toml::value::Datetime` type, so that `to toml`
serializes dates properly.


# User-Facing Changes

`to toml` will now encode dates differently, in a native format instead
of a string. This could, in theory, break some workflows:

```Nushell
# Before:
~> {datetime: 2024-05-31} | to toml | from toml | get datetime | into datetime
Fri, 31 May 2024 00:00:00 +0000 (10 hours ago)
# After:
~> {datetime: 2024-05-31} | to toml | from toml | get datetime | into datetime
Error: nu:🐚:only_supports_this_input_type

  × Input type not supported.
   ╭─[entry #13:1:36]
 1 │ {datetime: 2024-05-31} | to toml | from toml | get datetime | into datetime
   ·                                    ────┬────                  ──────┬──────
   ·                                        │                            ╰── only string and int input data is supported
   ·                                        ╰── input type: date
   ╰────
```

Fix #11751
2024-06-07 07:43:30 -05:00
..
command.rs Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
csv.rs Implement streaming I/O for CSV and TSV commands (#12918) 2024-05-22 16:55:24 +00:00
delimited.rs Implement streaming I/O for CSV and TSV commands (#12918) 2024-05-22 16:55:24 +00:00
json.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
md.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
mod.rs Msgpack commands (#12664) 2024-04-26 06:23:16 -05:00
msgpack.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
msgpackz.rs msgpackz: increase default compression level (#13035) 2024-06-04 17:19:10 -07:00
nuon.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
text.rs Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
toml.rs Use native toml datetime type in to toml (#13018) 2024-06-07 07:43:30 -05:00
tsv.rs Implement streaming I/O for CSV and TSV commands (#12918) 2024-05-22 16:55:24 +00:00
xml.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
yaml.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00