mirror of
https://github.com/nushell/nushell.git
synced 2025-04-22 20:28:22 +02:00
No related issue. Decided in nushell's weekly meeting: see [meeting notes](https://hackmd.io/rA1YecqjRh6I5m8dTq7BHw) # Description Converting a date as a human readable string to a datetime: - currently: using the ``into datetime`` command - after this change: using ``date from-human`` command Also moved the ``--list-human`` flag to the new command. # User-Facing Changes - Users have to use a new command for parsing human readable datetimes. Result: ```nushell ~> date from-human --list ╭────┬───────────────────────────────────┬──────────────╮ │ # │ parseable human datetime examples │ result │ ├────┼───────────────────────────────────┼──────────────┤ │ 0 │ Today 18:30 │ in 6 hours │ │ 1 │ 2022-11-07 13:25:30 │ 2 years ago │ │ 2 │ 15:20 Friday │ in 6 days │ │ 3 │ This Friday 17:00 │ in 6 days │ │ 4 │ 13:25, Next Tuesday │ in 3 days │ │ 5 │ Last Friday at 19:45 │ 16 hours ago │ │ 6 │ In 3 days │ in 2 days │ │ 7 │ In 2 hours │ in 2 hours │ │ 8 │ 10 hours and 5 minutes ago │ 10 hours ago │ │ 9 │ 1 years ago │ a year ago │ │ 10 │ A year ago │ a year ago │ │ 11 │ A month ago │ a month ago │ │ 12 │ A week ago │ a week ago │ │ 13 │ A day ago │ a day ago │ │ 14 │ An hour ago │ an hour ago │ │ 15 │ A minute ago │ a minute ago │ │ 16 │ A second ago │ now │ │ 17 │ Now │ now │ ╰────┴───────────────────────────────────┴──────────────╯ ~> "2 days ago" | date from-human Thu, 3 Apr 2025 12:03:33 +0200 (2 days ago) ~> "2 days ago" | into datetime Error: nu:🐚:datetime_parse_error × Unable to parse datetime: [2 days ago]. ╭─[entry #5:1:1] 1 │ "2 days ago" | into datetime · ──────┬───── · ╰── datetime parsing failed ╰──── help: Examples of supported inputs: * "5 pm" * "2020/12/4" * "2020.12.04 22:10 +2" * "2020-04-12 22:10:57 +02:00" * "2020-04-12T22:10:57.213231+02:00" * "Tue, 1 Jul 2003 10:52:37 +0200" ``` # Tests + Formatting Fmt, clippy 🆗 Tests 🆗 > Note: I was able to reactivate one unit test in the ``into datetime`` command # After Submitting Here since the user facing changes are significant, I think we should communicate in the released notes. Otherwise the automatically generated documentation should be enough IMO. |
||
---|---|---|
.. | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_formats | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_nu_example | ||
nu_plugin_polars | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu_plugin_stress_internals | ||
nu-cli | ||
nu-cmd-base | ||
nu-cmd-extra | ||
nu-cmd-lang | ||
nu-cmd-plugin | ||
nu-color-config | ||
nu-command | ||
nu-derive-value | ||
nu-engine | ||
nu-explore | ||
nu-glob | ||
nu-json | ||
nu-lsp | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-plugin-core | ||
nu-plugin-engine | ||
nu-plugin-protocol | ||
nu-plugin-test-support | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-std | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
nuon | ||
README.md |
Nushell core libraries and plugins
These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.
Foundational libraries are split into two kinds of crates:
- Core crates - those crates that work together to build the Nushell language engine
- Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.
Plugins are likewise also split into two types:
- Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
- Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.