← Back to Home
Ethiopian & Gregorian Date Converter API
Introduction
Welcome to the Ethiopian Date Conversion API! This API allows you to convert dates between the Ethiopian and Gregorian calendars. You can convert a Gregorian date to an Ethiopian date or vice versa. The API supports both single and bulk conversions.
Base URL
https://api.ethioall.com/convert/api?
Try the API
Click the button below to convert a sample Ethiopian date (2016-01-01) to Gregorian:
Response:
Click the button to see the response here...
API Endpoints
1. Convert Ethiopian Date to Gregorian
Use the ec parameter with the date in YYYY-MM-DD format.
https://api.ethioall.com/convert/api?ec=2016-01-01
2. Convert Gregorian Date to Ethiopian
Use the gc parameter with the date in YYYY-MM-DD format.
https://api.ethioall.com/convert/api?gc=2023-09-08
3. Bulk Conversion
Pass an array of dates for bulk conversion:
https://api.ethioall.com/convert/api?ec[]=1914-09-20&gc[]=2017-01-01
Examples
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.ethioall.com/convert/api?ec=2016-01-01");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo "Gregorian Date: {$data[0]['day']} {$data[0]['month_name']} {$data[0]['year']}";
curl_close($ch);
Python
import requests
url = "https://api.ethioall.com/convert/api?gc=2023-09-08"
response = requests.get(url)
if response.status_code == 200:
data = response.json()
print(f"Ethiopian Date: {data[0]['day']} {data[0]['month_name']['english']} {data[0]['year']}")
JavaScript (Node.js)
const axios = require('axios');
axios.get('https://api.ethioall.com/convert/api?ec[]=2016-01-01&gc[]=2023-09-08')
.then((response) => console.log(response.data));
Error Handling
- 400 Bad Request: The request was not formatted properly.
- 404 Not Found: The requested resource could not be found.
- 500 Internal Server Error: An error occurred on the server.