We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dsazz/mcp-confluence'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
date.helper.ts•697 B
/**
* Date Formatting Helper
*
* Shared utility functions for consistent date formatting across all formatters
*/
/**
* Formats a date to ISO string format
*
* @param date - Date to format (Date object or ISO string)
* @returns ISO string representation of the date
*/
export function formatDate(date: Date | string): string {
if (typeof date === "string") {
return new Date(date).toISOString();
}
return date.toISOString();
}
/**
* Formats multiple dates to ISO string format
*
* @param dates - Array of dates to format
* @returns Array of ISO string representations
*/
export function formatDates(dates: (Date | string)[]): string[] {
return dates.map(formatDate);
}