utilities
Comprehensive date calculations with arithmetic, differences, age, business days, and formatting
While you can view all details here, using this MCP server's API requires a Enterprise subscription. API calls with FREE plan keys will return an access error.
View Pricing PlansAdd time units (years, months, weeks, days, hours, minutes, seconds) to a date. Supports business days calculation with weekend and holiday exclusion.
Calculate detailed age from a birth date including years, months, days, and total time in various units.
Calculate the difference between two dates with comprehensive breakdown including years, months, days, business days, and age statistics.
Convert a date to different formats and timezones with optional metadata.
Subtract time units from a date. Supports business days calculation with weekend and holiday exclusion.
Add the Date Calculator MCP server to your MCP client configuration:
{
"mcpServers": {
"date-calculator": {
"command": "curl",
"args": [
"-X", "POST",
"https://apistack.online/api/mcp/utilities/date-calculator/sse",
"-H", "Content-Type: application/json",
"-H", "Authorization: Bearer YOUR_API_KEY",
"--data-raw", "@-"
],
"transport": "sse"
}
}
}
Replace YOUR_API_KEY with your APIStack API key from the Dashboard.
// Add 30 days to January 1, 2024
const result = await mcpClient.callTool('add_to_date', {
date: '2024-01-01',
value: 30,
unit: 'days',
outputFormat: 'readable'
});
// Calculate age from birth date with metadata
const result = await mcpClient.callTool('calculate_age', {
date: '1990-05-15',
includeMetadata: true
});
// Calculate difference with business days
const result = await mcpClient.callTool('calculate_date_difference', {
date: '2024-01-01',
targetDate: '2024-12-31',
country: 'US'
});
// Date Calculator MCP Client Example
const response = await fetch('https://apistack.online/api/mcp/utilities/date-calculator/sse', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'req-1',
method: 'tools/call',
params: {
name: 'add_to_date',
arguments: {
date: '2024-01-01',
value: 30,
unit: 'days',
outputFormat: 'iso'
}
}
})
});
const result = await response.json();
console.log(result);
# Date Calculator MCP Client Example
import requests
response = requests.post(
'https://apistack.online/api/mcp/utilities/date-calculator/sse',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
json={
'jsonrpc': '2.0',
'id': 'req-1',
'method': 'tools/call',
'params': {
'name': 'calculate_age',
'arguments': {
'date': '1990-05-15',
'includeMetadata': True
}
}
}
)
result = response.json()
print(result)
# Date Calculator MCP Client Example
curl -X POST https://apistack.online/api/mcp/utilities/date-calculator/sse \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": "req-1",
"method": "tools/call",
"params": {
"name": "calculate_date_difference",
"arguments": {
"date": "2024-01-01",
"targetDate": "2024-12-31",
"country": "US"
}
}
}'
// Subtract 6 months from a date
const response = await fetch('https://apistack.online/api/mcp/utilities/date-calculator/sse', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'req-2',
method: 'tools/call',
params: {
name: 'subtract_from_date',
arguments: {
date: '2024-06-15',
value: 6,
unit: 'months',
timezone: 'America/New_York'
}
}
})
});
const result = await response.json();
console.log(result);
Add this configuration to your MCP client:
Note: Replace "YOUR_API_KEY" with a valid Enterprise API key. FREE plan keys will receive access errors.
{
"mcpServers": {
"date-calculator-utilities": {
"command": "curl",
"args": [
"-X",
"POST",
"https://apistack.online/api/mcp/utilities/date-calculator/sse",
"-H",
"Content-Type: application/json",
"-H",
"Authorization: Bearer YOUR_API_KEY",
"--data-raw",
"@-"
],
"transport": "sse"
}
}
}Use the MCP configuration above in your AI client, or test the underlying APIs in our playground.
API playground requires a Enterprise subscription for access.