# Date handling

Day.js is a lightweight JavaScript library for parsing, validating, manipulating, and formatting dates and times, designed to be a simpler and smaller alternative to Moment.js.&#x20;

Day.js is already included in Lowcoder, so you can directly begin using it to work with dates and times by creating Day.js objects using `dayjs()`. This function accepts various formats, including strings, Date objects, and UNIX timestamps, allowing for flexible date and time manipulation such as adding or subtracting time, formatting dates, and comparing dates.

{% hint style="info" %}
You can read how to use Day.js in their excellent Documentation here: <https://day.js.org/docs/en/get-set/get>
{% endhint %}

### Day.js Plugins

To enhance Day.js's functionality, developers can utilize its plugin system, which allows for the inclusion of additional features not available in the core library.&#x20;

Since Lowcoder Version 2.3.1, we load all DayJS plugins automatically

{% hint style="info" %}
An overview of Day.js Plugins: <https://day.js.org/docs/en/plugin/plugin>
{% endhint %}

You can use Day.js Plugins at all places in Lowcoder that support {{ }} Handlebar notation.

```javascript
Quarter: {{dayjs().format('Q')}}

Day of Month with ordinal: {{dayjs().format('Do')}}

Week of year: {{dayjs().format('w')}}

{{dayjs('2013-11-18 11:55').tz('Asia/Taipei')}}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lowcoder.cloud/lowcoder-documentation/build-applications/app-editor/date-handling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
