Relative Time Formatter is a tool for converting timestamps and dates to human-readable relative time formats like '2 hours ago' or 'in 3 days'. It supports multiple styles and custom reference times for flexible time representation.
async function callRelativeTimeFormatterAPI() {
try {
const params = new URLSearchParams({
timestamp: '1609459200',
date: '2024-01-01T00:00:00Z',
reference: '2024-06-01T00:00:00Z',
style: 'short'
});
const response = await fetch(`https://api.apiverve.com/v1/relativetimeformatter?${params}`, {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE'
}
});
const data = await response.json();
console.log(data);
} catch (error) {
console.error('Error:', error);
}
}
callRelativeTimeFormatterAPI();curl -X GET "https://api.apiverve.com/v1/relativetimeformatter?param=value" \
-H "x-api-key: YOUR_API_KEY_HERE"Get your API key: https://apiverve.com
📁 For more examples, see the examples folder
Choose your preferred programming language:
npm install @apiverve/relativetimeformatterView NPM Package → | Package Code →
dotnet add package APIVerve.API.RelativeTimeFormatterView NuGet Package → | Package Code →
pip install apiverve-relativetimeformatterView PyPI Package → | Package Code →
implementation 'com.github.apiverve:relativetimeformatter-api:1.0.0'✅ Multi-platform support - Use the same API across Node.js, .NET, Python, Android, and browsers ✅ Simple authentication - Just add your API key in the request header ✅ Comprehensive documentation - Full examples and API reference available ✅ Production-ready - Used by developers worldwide
📚 Full API Documentation: https://docs.apiverve.com/ref/relativetimeformatter
Common use cases for the Relative Time Formatter API:
- ✅ Integration into web applications
- ✅ Mobile app development
- ✅ Data analysis and reporting
- ✅ Automation workflows
- ✅ Microservices architecture
All requests require an API key in the header:
x-api-key: YOUR_API_KEY_HERE
Get your API key: https://apiverve.com
All responses are JSON with this structure:
{
"status": "ok",
"data": { ... }
}- 💬 Support: https://apiverve.com/contact
- 🐛 Issues: GitHub Issues
- 📖 Documentation: https://docs.apiverve.com
- 🌐 Website: https://apiverve.com
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
For security concerns, please review our Security Policy.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ by APIVerve
Copyright © 2025 APIVerve. All rights reserved.