Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spojit.com/llms.txt

Use this file to discover all available pages before exploring further.

The Date & Time connector provides operations for working with dates and times — formatting, parsing, timezone conversion, arithmetic, and comparisons.
No connection required — this utility connector works out of the box.

Tools

timezone
string
Timezone (e.g., America/New_York). Defaults to UTC.
format
string
Output format. Defaults to ISO 8601.
Example request:
{ "timezone": "America/New_York", "format": "YYYY-MM-DD HH:mm:ss" }
Example response:
{ "result": "2025-06-15 14:30:22" }
date
string
required
Date to format (ISO 8601, Unix timestamp, or parseable string).
format
string
required
Output format string (e.g., YYYY-MM-DD HH:mm:ss, DD/MM/YYYY).
timezone
string
Convert to timezone before formatting.
Example request:
{
  "date": "2025-03-15T10:30:00Z",
  "format": "dddd, MMMM D, YYYY [at] hh:mm A",
  "timezone": "America/Los_Angeles"
}
Example response:
{ "result": "Saturday, March 15, 2025 at 03:30 AM" }
Parse a date string to ISO 8601 format.
date
string
required
Date string to parse.
inputFormat
string
Expected input format (e.g., MM/DD/YYYY).
timezone
string
Timezone to interpret the date in. Defaults to UTC.
Example request:
{
  "date": "15/03/2025 14:30",
  "inputFormat": "DD/MM/YYYY HH:mm",
  "timezone": "Europe/London"
}
Example response:
{ "iso": "2025-03-15T14:30:00.000Z" }
date
string
required
Starting date.
value
number
required
Amount to add (can be negative).
unit
string
required
Unit: year, month, week, day, hour, minute, second, or millisecond.
Example request:
{ "date": "2025-01-15T00:00:00Z", "value": 30, "unit": "day" }
Example response:
{ "iso": "2025-02-14T00:00:00.000Z" }
date
string
required
Starting date.
value
number
required
Amount to subtract.
unit
string
required
Unit: year, month, week, day, hour, minute, second, or millisecond.
Example request:
{ "date": "2025-06-01T12:00:00Z", "value": 3, "unit": "month" }
Example response:
{ "iso": "2025-03-01T12:00:00.000Z" }
date1
string
required
First date.
date2
string
required
Second date.
unit
string
default:"day"
Unit for the result.
precise
boolean
default:"false"
Return decimal value.
Example request:
{
  "date1": "2025-12-25T00:00:00Z",
  "date2": "2025-01-01T00:00:00Z",
  "unit": "day"
}
Example response:
{ "value": 358, "unit": "day" }
date
string
required
Date to convert.
from
string
Source timezone.
to
string
required
Target timezone.
format
string
Output format.
Example request:
{
  "date": "2025-06-15 09:00",
  "from": "America/New_York",
  "to": "Asia/Tokyo",
  "format": "YYYY-MM-DD HH:mm:ss Z"
}
Example response:
{ "result": "2025-06-15 22:00:00 +09:00" }
Get the start of a year, month, week, day, hour, minute, or second.
date
string
required
Reference date.
unit
string
required
Unit: year, month, week, day, hour, minute, or second.
Example request:
{ "date": "2025-06-15T14:30:00Z", "unit": "month" }
Example response:
{ "iso": "2025-06-01T00:00:00.000Z" }
Get the end of a year, month, week, day, hour, minute, or second.
date
string
required
Reference date.
unit
string
required
Unit: year, month, week, day, hour, minute, or second.
Example request:
{ "date": "2025-06-15T14:30:00Z", "unit": "month" }
Example response:
{ "iso": "2025-06-30T23:59:59.999Z" }
date
string
required
Date to check.
compareTo
string
required
Date to compare against.
unit
string
Comparison granularity.
Example request:
{
  "date": "2025-01-15T00:00:00Z",
  "compareTo": "2025-06-01T00:00:00Z",
  "unit": "month"
}
Example response:
{ "result": true }
date
string
required
Date to check.
compareTo
string
required
Date to compare against.
unit
string
Comparison granularity.
Example request:
{
  "date": "2025-12-01T00:00:00Z",
  "compareTo": "2025-06-01T00:00:00Z"
}
Example response:
{ "result": true }
date
string
required
Date to check.
start
string
required
Start of range.
end
string
required
End of range.
unit
string
Comparison granularity.
inclusivity
string
default:"()"
Boundary inclusivity: (), [], [), or (].
Example request:
{
  "date": "2025-06-15T00:00:00Z",
  "start": "2025-06-01T00:00:00Z",
  "end": "2025-06-30T23:59:59Z",
  "inclusivity": "[]"
}
Example response:
{ "result": true }
Returns strings like “2 hours ago” or “in 3 days”.
date
string
required
Date to format.
from
string
Reference date (defaults to now).
withoutSuffix
boolean
default:"false"
Omit “ago” or “in” prefix/suffix.
Example request:
{
  "date": "2025-06-10T00:00:00Z",
  "from": "2025-06-15T00:00:00Z"
}
Example response:
{ "text": "5 days ago" }
Extract year, month, day, hour, minute, second, etc.
date
string
required
Date to extract from.
timezone
string
Timezone for extraction.
Example request:
{ "date": "2025-06-15T14:30:00Z", "timezone": "America/New_York" }
Example response:
{
  "year": 2025,
  "month": 6,
  "day": 15,
  "hour": 10,
  "minute": 30,
  "second": 0,
  "millisecond": 0,
  "dayOfWeek": 0,
  "dayOfYear": 166,
  "weekOfYear": 25,
  "quarter": 2,
  "isLeapYear": false,
  "daysInMonth": 30,
  "unix": 1750000200,
  "iso": "2025-06-15T14:30:00.000Z"
}
value
string | number
required
Date string or Unix timestamp.
toUnix
boolean
default:"true"
true = date to timestamp, false = timestamp to date.
milliseconds
boolean
default:"false"
Use milliseconds instead of seconds.
Example request:
{ "value": "2025-06-15T00:00:00Z", "toUnix": true }
Example response:
{ "unix": 1749945600 }
Returns a list of common timezone identifiers. No parameters required.Example request:
{}
Example response:
{
  "timezones": [
    "UTC",
    "America/New_York",
    "America/Chicago",
    "America/Denver",
    "America/Los_Angeles",
    "Europe/London",
    "Europe/Paris",
    "Asia/Tokyo",
    "Australia/Sydney",
    "Pacific/Auckland"
  ],
  "count": 26
}