Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Petro31 committed Nov 18, 2023
1 parent 0ed2068 commit c867ba2
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ attribute| str or None | No | `None` | (Optional) attribute to extract the desir
language| string | set by user | `'en'` | (Optional) Override the default language.
utc| boolean | `False` | `True` | (Optional) If your `uptime` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
max_period| string | `'year'` | '`hour`'| (Optional) Truncate the maximum significant period. Available options: `year`, `week`, `day`, `hour`, `minute` and `second`
short | boolean | `False` | `True` | (Optional) Outputs abbreviated values. E.g. `12hr 50min`.
floor | boolean | `False` | `True` | (Optional) The time will chop the value instead of rounding. E.g. If the duration is 10.6 mintues, the output will be `10 Minutes` instead of `11 minutes`.

### Examples

Expand Down Expand Up @@ -133,6 +135,7 @@ attribute| str or None | No | `None` | (Optional) attribute to extract the desir
language| string | set by user | `'en'` | (Optional) Override the default language.
utc| boolean | `False` | `True` | (Optional) If your `uptime` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
max_period| string | `'year'` | '`hour`'| (Optional) Truncate the maximum significant period. Available options: `year`, `week`, `day`, `hour`, `minute` and `second`
short | boolean | `False` | `True` | (Optional) Outputs abbreviated values. E.g. `12hr 50min`.

### Examples

Expand Down Expand Up @@ -170,6 +173,7 @@ attribute| str or None | No | `None` | (Required for `custom_time_attr`) attribu
values | string | none | `'day, hour, minute'` | (Required) Options for displaying time. Available options: `year`, `week`, `day`, `hour`, `minute` and `second`.
language| string | set by user | `'en'` | (Optional) Override the default language.
utc| boolean | `False` | `True` | (Optional) If your `uptime` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
short | boolean | `False` | `True` | (Optional) Outputs abbreviated values. E.g. `12hr 50min`.

### Examples

Expand Down Expand Up @@ -205,6 +209,8 @@ attribute| str or None | No | `None` | (Optional) attribute to extract the desir
language| string | set by user | `'en'` | (Optional) Override the default language.
utc| boolean | `False` | `True` | (Optional) If your `uptime` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
max_period| string | `'year'` | '`hour`'| (Optional) Truncate the maximum significant period. Available options: `year`, `week`, `day`, `hour`, `minute` and `second`
short | boolean | `False` | `True` | (Optional) Outputs abbreviated values. E.g. `12hr 50min`.
floor | boolean | `False` | `True` | (Optional) The time will chop the value instead of rounding. E.g. If the duration is 10.6 mintues, the output will be `10 Minutes` instead of `11 minutes`.

### Examples

Expand Down Expand Up @@ -242,6 +248,7 @@ attribute| str or None | No | `None` | (Optional) attribute to extract the desir
language| string | set by user | `'en'` | (Optional) Override the default language.
utc| boolean | `False` | `True` | (Optional) If your `uptime` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
max_period| string | `'year'` | '`hour`'| (Optional) Truncate the maximum significant period. Available options: `year`, `week`, `day`, `hour`, `minute` and `second`
short | boolean | `False` | `True` | (Optional) Outputs abbreviated values. E.g. `12hr 50min`.

### Examples

Expand Down Expand Up @@ -279,6 +286,7 @@ attribute| str or None | No | `None` | (Required for `custom_relative_time_attr`
values | string | none | `'day, hour, minute'` | (Required) Options for displaying time. Available options: `year`, `week`, `day`, `hour`, `minute` and `second`.
language| string | set by user | `'en'` | (Optional) Override the default language.
utc| boolean | `False` | `True` | (Optional) If your `uptime` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
short | boolean | `False` | `True` | (Optional) Outputs abbreviated values. E.g. `12hr 50min`.

### Examples

Expand Down Expand Up @@ -320,6 +328,8 @@ language| string | set by user | `'en'` | (Optional) Override the default langua
utc1| boolean | `False` | `True` | (Optional) If your `entity_id_or_time1` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
utc1| boolean | `False` | `True` | (Optional) If your `entity_id_or_time2` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
max_period| string | `'year'` | '`hour`'| (Optional) Truncate the maximum significant period. Available options: `year`, `week`, `day`, `hour`, `minute` and `second`
short | boolean | `False` | `True` | (Optional) Outputs abbreviated values. E.g. `12hr 50min`.
floor | boolean | `False` | `True` | (Optional) The time will chop the value instead of rounding. E.g. If the duration is 10.6 mintues, the output will be `10 Minutes` instead of `11 minutes`.

### Examples

Expand Down Expand Up @@ -356,6 +366,7 @@ language| string | set by user | `'en'` | (Optional) Override the default langua
utc1| boolean | `False` | `True` | (Optional) If your `entity_id_or_time1` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
utc1| boolean | `False` | `True` | (Optional) If your `entity_id_or_time2` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
max_period| string | `'year'` | '`hour`'| (Optional) Truncate the maximum significant period. Available options: `year`, `week`, `day`, `hour`, `minute` and `second`
short | boolean | `False` | `True` | (Optional) Outputs abbreviated values. E.g. `12hr 50min`.

### Examples

Expand Down Expand Up @@ -392,6 +403,7 @@ attr2| str or None | No | `None` | (Optional) attribute to extract from entity_i
language| string | set by user | `'en'` | (Optional) Override the default language.
utc1| boolean | `False` | `True` | (Optional) If your `entity_id_or_time1` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
utc1| boolean | `False` | `True` | (Optional) If your `entity_id_or_time2` argument does not have a timezone and you wish to treat it as a UTC timestamp, set this to True. Otherwise the function assumes `Local` calculations.
short | boolean | `False` | `True` | (Optional) Outputs abbreviated values. E.g. `12hr 50min`.

### Examples

Expand Down Expand Up @@ -761,7 +773,7 @@ This outputs the number of days until the next DST. Useful for notifications.

## `month(month)`

Outputs the current month in your langauge. (Optional) Add the [month](https://github.com/Petro31/easy-time-jinja#arguments-for-each-macro) argument to get any translated month.
Outputs the current month in your langauge. (Optional) Add the [month](https://github.com/Petro31/easy-time-jinja#arguments-for-each-macro) argument to get any translated month. The `month` argument can also be a datetime object.

```jinja
{% from 'easy_time.jinja' import month %}
Expand All @@ -775,7 +787,7 @@ Outputs the current month in your langauge. (Optional) Add the [month](https://

## `weekday(weekday)`

Outputs the current weekday in your langauge. (Optional) Add the [weekday](https://github.com/Petro31/easy-time-jinja#date-arguments) argument to get any translated month.
Outputs the current weekday in your langauge. (Optional) Add the [weekday](https://github.com/Petro31/easy-time-jinja#date-arguments) argument to get any translated weekday. The `weekday` argument can also be a datetime object.

```jinja
{% from 'easy_time.jinja' import weekday %}
Expand Down

0 comments on commit c867ba2

Please sign in to comment.