Date and Time
Working with current date and time is essential for many workflows, but YOOtheme Pro doesn't provide built-in global access to this information. Essentials solves this by offering a Global Request source that provides access to the request timestamp and other useful data.
Working with Timestamps
By mapping the Request Timestamp to a layout element, you gain access to the current date and time, which can then be formatted as needed to achieve your desired output.
Modifying Dates
You can modify the date to obtain timestamps for different time periods:
- Yesterday: Subtract one day using
-1 day
- Tomorrow: Add one day using
+1 day
- Custom intervals: Use any valid PHP date modification string
Using Timestamps in Conditions
When mapping the current timestamp to access or filter conditions, you can control content display based on the current date and time.
Important: When comparing dates, both values must be formatted as ISO-compliant dates:
- Use
c
format for complete timestamps - Use
Y-m-d
format for date-only comparisons