Date Module

Get calendar days

Description: This function accepts a month and year as inputs and outputs an array of days primarily used for calendar rendering. It includes not only the days of the specified month but also some days from the previous and following months to complete the calendar matrix. If you prefer to receive only the days from the specified month, you can adjust the “only_current” parameter to false, which will exclude the extra days from the previous and next months.

    "type": "date",
    "action": "get_days",
    "args": {
        "month": 0, // january
        "year": 2000,
        "only_current": true,
        "target": "$data.days"

As you can see above, the month is a number value starting at 0 for January. The result is an array of day definition objects with the following properties.

  1. number – the day of the month for example 1 January, the number is 1
  2. current – this boolean value determines whether the given day belongs to the specified month. It is commonly utilized in rendering processes, where overflow days are flagged as suppressed. When handling these values, you can refer to this property to ascertain if the day is part of the current month.
  3. day – the shortened form of the day’s name, for instance, “Monday” is abbreviated to “Mon”.
  4. date – a JavaScript date object for that day.