# Setup Your Date Field for Good Parsing

This module is built on top of day.js, which is the recognized standard for JS date-time formatting. It parses your current date content automatically, and handles the formatting, date math, and localization as well.&#x20;

Unfortunately dates are not globally standard- a common example is month-day-year vs. day-month-year conventions that different countries have.&#x20;

{% hint style="warning" %}
Does 01-03-2025 mean Jan 3rd, or March 1st?  *It depends on where you are.*&#x20;
{% endhint %}

## Best Practices&#x20;

To ensure that day.js is parsing the date correctly, the best practice is to use an international convention close to ISO8601. &#x20;

{% hint style="success" %}
ISO8601 uses a YMD convention, e.g. 2025-03-01, which will always be able to parse as March 1st, 2025.&#x20;
{% endhint %}

We highly recommend that you use this convention to ensure good parsing.&#x20;

For CMS-stored dates, Webflow offers a range of formats.  The best date format for this is halfway down the list and is shown here.&#x20;

Use either...

* YYYY-MM-DD HH:mm&#x20;
* or YYYY-MM-DD&#x20;

{% hint style="success" %}
The first option works for all uses you might have.  The second works if you do not care about the time portion.&#x20;
{% endhint %}

<figure><img src="/files/GI6SORQS8SL858cxa87t" alt=""><figcaption><p>Ideally use this date format to ensure correct datetime parsing. </p></figcaption></figure>


---

# 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://attr.sygnal.com/sa5-format/format-dates/setup-your-date-field-for-good-parsing.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.
