Date
Magento\Backend\Model\Dashboard\Chart\Date
What it does
This class generates an array of date strings for dashboard charts based on a specified time period (24 hours, 7 days, 1 month, 1 year, or 2 years).
Developers use it to create the x-axis labels for admin dashboard charts, ensuring dates are formatted correctly and aligned with the store's timezone.
It automatically determines the appropriate date granularity (hourly, daily, or monthly) based on the selected period.
Public Methods
- getByPeriod()