-
Notifications
You must be signed in to change notification settings - Fork 2.1k
into datetime only gets last part of date in output when on list/table #8549
Copy link
Copy link
Closed
Labels
polishthis problem makes nu feel unpolishedthis problem makes nu feel unpolishedstatus:needs-core-team-attentionAn issue than needs the attention of other core-team membersAn issue than needs the attention of other core-team membersstatus:needs-designthis feature requires designthis feature requires design
Milestone
Description
Describe the bug
Parsing a datetime when on a list/table, only uses the last part of the output. While it is still correct, I believe it would be a nicer to have a custom option to modify the output..
I Imagine that this has been done on purpose, specially to have a nice output for the ls commands and others that rely on datetimes, but maybe for my use case (and hope others), a nicer representation would be nice.
Most likely very unnecessary, but even taking a range of the datetimes given, an select the best fit format would be way nicer.
How to reproduce
❯ [1649203200000000000,1649289600000000000] | into datetime
╭───┬────────────╮
│ 0 │ a year ago │
│ 1 │ a year ago │
╰───┴────────────╯
Expected behavior
Output above is not very useful, specially if a table consists of only daily values. A nicer output could be
❯ [1649203200000000000,1649289600000000000] | into datetime
╭───┬────────────╮
│ 0 │ 2022-04-06 │
│ 1 │ 2022-04-07│
╰───┴────────────╯
Or something like that :)
Screenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.77.2 |
| branch | main |
| commit_hash | ef7fbf4 |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.66.1 (90743e729 2023-01-10) |
| rust_channel | 1.66.1-x86_64-unknown-linux-gnu |
| cargo_version | cargo 1.66.1 (ad779e08b 2023-01-10) |
| build_time | 2023-03-17 16:55:09 +01:00 |
| build_rust_channel | release |
| features | default, zip |
| installed_plugins | from parquet |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
polishthis problem makes nu feel unpolishedthis problem makes nu feel unpolishedstatus:needs-core-team-attentionAn issue than needs the attention of other core-team membersAn issue than needs the attention of other core-team membersstatus:needs-designthis feature requires designthis feature requires design