Skip to main content

system.kanoa.date.getDateRange

This function requires KanoaCore module.

Description

Returns predefined date ranges. (kanoaCore)

Syntax

getDateRange(paramsDict, selectedDateRange, clientTZ)
  • Parameters:
      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
  • Returns:
      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)