How to Use Our Date Calculator Script

Welcome to our Date Calculator service! This tool allows you to calculate the number of days until a certain date and check if the date is a recognized special event in our system. It's simple and easy to use via a standard web request. Below, we guide you on how to construct your request and interpret the response from our service.

Step 1: Understanding the Request Format

To use our service, you'll need to send an HTTP GET request with specific parameters. Here's the format you should use:[your-date]&json=[true|false]

- date: The target date you want information about. This service accepts dates in the formats "YYYY-MM-DD" (e.g., 2023-12-31) and "DD-MM-YYYY" (e.g., 31-12-2023).

- json: Optional. If set to true, the service will respond with a JSON object. If omitted or set to false, you'll receive a plain text response.

Step 2: Constructing Your Request

Replace [your-date] with your target date, keeping in mind the formats mentioned above. Decide if you want a JSON response and set the json parameter accordingly. Here are a couple of examples:

Step 3: Interpreting the Response

After sending your request, you'll receive a response from our service. Depending on your input, here are the types of responses you can expect:

Using on Twitch for NightBot and StreamElements

Replace [your-date] with your target date, keeping in mind the formats mentioned above, JSON output is NOT required for Twitch Bots

!addcmd !command_name $urlfetch([your-date])
!command add !command_name $readapi([your-date])

Example of JSON Response

If you set json=true, you'll receive a response in the following format:

{ "days_until": 85, "event": "Mark's Birthday" }


We hope this guide helps you effectively use our Date Calculator service, if you encounter any issues or have any questions/feature requests then please reach out to the support team