0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

Date and Time → Get Calendar Week

AI-generated

Overview

The "Get Calendar Week" operation in the Date and Time resource of this node calculates the calendar week number for a given date input. This is useful when you need to determine which week of the year a specific date falls into, according to calendar week conventions.

Common scenarios include:

  • Scheduling or planning workflows based on week numbers.
  • Generating reports grouped by calendar weeks.
  • Aligning data processing with weekly periods.

For example, if you provide the date "2023-01-01", the node will return the calendar week number corresponding to that date.

Properties

Name Meaning
Date The date string (e.g., "2023-01-01") to get the calendar week for.
Unix Timestamp A Unix timestamp (number of seconds since epoch) to get the calendar week for.
Year The year as a string (e.g., "2023") to specify the year context for the calendar week.
Week Number The week number (e.g., 25) to specify a particular week within the year.

Note: These properties are used as inputs to calculate or retrieve the calendar week information.

Output

The output JSON contains the calculated calendar week information based on the provided input. Typically, it includes the week number corresponding to the input date or timestamp.

If the node supports binary data output, it would represent related date/time data in binary form, but for this operation, the output is primarily JSON with calendar week details.

Dependencies

  • Requires an API key credential to authenticate requests to the external 0CodeKit service at https://prod.0codekit.com.
  • The node sends a POST request to the /dateandtime/calendarweek endpoint with the input parameters.

Troubleshooting

  • Invalid Date Format: If the date string is not in a recognized format, the node may fail to compute the calendar week. Ensure the date follows ISO format (YYYY-MM-DD).
  • Missing Inputs: Providing neither a date nor a Unix timestamp might cause errors or empty results. Always supply at least one valid input.
  • API Authentication Errors: If the API key credential is missing or invalid, the node will fail to connect to the service. Verify the API key configuration.
  • Network Issues: Connectivity problems to the external API endpoint can cause timeouts or failures.

Links and References

Discussion