system.kanoa.date.getDateRange
Description
Returns predefined date ranges. (kanoaCore)Syntax
getDateRange(paramsDict, selectedDateRange, clientTZ)- paramsDict (dict): A dictionary containing the following keys:
- selectedDateRange (str): Valid values are 'Today', 'Yesterday', 'This Week', 'Last Week', 'This Month', 'Last Month', 'Year To Date'
- clientTZ (str): Client timezone
- startDate (datetime): Start date of the range
- endDate (datetime): End date of the range
Code Example
# Example Usage:
startDate, endDate = system.kanoa.date.getDateRange(paramsDict, selectedDateRange, clientTZ)