# Time and Date

## Run instructions On Time

{% hint style="success" %}
These triggers is event-based and carefully crafted for optimal performance, making it more efficient and better for performance compared to frequent checks every frame.
{% endhint %}

<figure><img src="https://756218607-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv2D32cRkVCHsF9VcmKPA%2Fuploads%2FryOyJfdaCkBMAVGdJ6HA%2FScreenshot%202025-01-24%20152207.png?alt=media&#x26;token=2da3e9e9-455a-48cb-92dd-ffa2bb959afe" alt=""><figcaption><p>Using '<a href="../triggers/on-time"><mark style="color:yellow;">On Time</mark></a>', '<a href="../triggers/on-day-and-time"><mark style="color:blue;">On Day and Time</mark></a>' and '<a href="../triggers/on-year-day-and-time"><mark style="color:green;">On Year, Day, and Time</mark></a>' triggers to trigger based on your specific needs. Using Daily Cycle, or Yearly Cycle means that the trigger will go into 'hibernation' and not do any more checks before a new day or a new year has happened. The trigger 'On Year, Day and Time' will completely stop checking unless the Keep Checking In Past is enabled. </p></figcaption></figure>

{% hint style="info" %}
Changing the 'Use Daily Cycle', 'Use Yearly Cycle,' or 'Keep Checking In Past' settings is not recommended unless you intend to manually reset the time to a previous value (e.g., going back in time to a specific date or event).
{% endhint %}

## Display time in UI

<figure><img src="https://756218607-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv2D32cRkVCHsF9VcmKPA%2Fuploads%2Ftu2yzVkOdNp8lbloUpPf%2FScreenshot%202025-01-24%20155422.png?alt=media&#x26;token=96ea95b1-9c83-40bf-9df3-9ea41d7a820d" alt=""><figcaption><p>Using the '<mark style="color:yellow;">Set Text</mark>' Instruction on an '<a href="../triggers/on-time-interval"><mark style="color:red;">On Time Interval</mark></a>' Trigger. Make sure Trigger On Start is enabled so it initialize the UI on start.</p></figcaption></figure>

## Display date in UI

<figure><img src="https://756218607-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv2D32cRkVCHsF9VcmKPA%2Fuploads%2FNFmLqsZ76HXnOFZXmjLR%2FScreenshot%202025-01-20%20141525.png?alt=media&#x26;token=970e03ec-52fd-45dc-9278-d568ec14b61f" alt=""><figcaption><p>Using the '<mark style="color:yellow;">Join Text</mark>' Instruction on an '<a href="../triggers/on-time-interval"><mark style="color:red;">On Time Interval</mark></a>' Trigger. Make sure Trigger On Start is enabled so it initialize the UI on start.</p></figcaption></figure>

## Setting the time or date

{% hint style="warning" %}
Setting the time or date directly bypasses any event-based triggers that would normally be fired between the current time and the time being set.
{% endhint %}

<figure><img src="https://756218607-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv2D32cRkVCHsF9VcmKPA%2Fuploads%2FS5hZrCmgoc6FiEwcrGkp%2FScreenshot%202025-01-20%20142754.png?alt=media&#x26;token=37493a55-8c4a-419a-8f4b-667d307a6e53" alt=""><figcaption><p>Using the <mark style="color:blue;">Set Number</mark> Instruction. In this case, the time will instantly be set to 13:00 (1 PM). Remember to use only the range 0–23 for hours and 0–59 for minutes. This logic can also be applied to setting the day or year.</p></figcaption></figure>

## Transition time

{% hint style="info" %}
If the Time Curve isn't already set to Linear, it's recommended to switch it to Linear before the transition to make it smoother.&#x20;

*This can be done using the* [*Set Time Curve*](https://docs.fullscreen.no/info/game-creator-2-assets/cozy-stylized-weather-integration/instructions/set-time-curve) *instruction.*
{% endhint %}

<figure><img src="https://756218607-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv2D32cRkVCHsF9VcmKPA%2Fuploads%2FR22Tb0CnWyHVJMDP7KZ2%2Fimage.png?alt=media&#x26;token=e31295df-8b41-4dfe-8809-1a5791e0ae88" alt=""><figcaption><p>Using the '<mark style="color:yellow;">Transition Time</mark>' Instruction. In this case, the time will transition to 13:00 (1 PM) over 5 seconds. Remember to use only the range 0–23 for hours and 0–59 for minutes.</p></figcaption></figure>
