Home Explore Blog CI



nushell

commands/docs/date_humanize.md
90ff96ef488e38c2adf1d0409438476c53f3ae9b5a0b505f0000000300000329
---
title: date humanize
categories: |
  date
version: 0.104.0
date: |
  Print a 'humanized' format for the date, relative to now.
usage: |
  Print a 'humanized' format for the date, relative to now.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `date humanize` for [date](/commands/categories/date.md)

<div class='command-title'>Print a &amp;#x27;humanized&amp;#x27; format for the date, relative to now.</div>

## Signature

```> date humanize {flags} ```


## Input/output types:

| input    | output |
| -------- | ------ |
| datetime | string |
| string   | string |
## Examples

Print a 'humanized' format for the date, relative to now.
```nu
> "2021-10-22 20:00:12 +01:00" | date humanize

```

Chunks
9ff2d8ef (1st chunk of `commands/docs/date_humanize.md`)
Title: date humanize command
Summary
The `date humanize` command in Nushell is designed to convert a given date into a human-readable format, expressing it in terms of its relation to the current time. This command is particularly useful for displaying dates in a user-friendly manner, such as "2 days ago" or "in 3 weeks". It accepts date input either as a datetime object or a string representation of a date. The output is always a string that describes the date's relative time from the present. This functionality enhances the readability and user experience when dealing with dates in Nushell scripts and commands, making it easier for users to understand the timing of events without needing to perform manual calculations or conversions. The command effectively abstracts away the complexity of date arithmetic, providing a simple and intuitive way to present temporal information.