Introduction
Welcome to the Ethiopian Date API! This API allows you to easily retrieve the current Ethiopian date, including the day, month, year, and the numeric date, both in Amharic and English. You can use this API to integrate Ethiopian date functionality into your applications, websites, and more.
Base URL
https://api.ethioall.com/date/api
Try the API
Click the button below to fetch the current Ethiopian date in real-time:
Response:
Click the button to see the response here...
Example API Response Format
{
"day": "ሰኞ",
"month": "መስከረም",
"date": 21,
"year": 2017,
"numeric_date": "21-1-2017",
"day_english": "Monday",
"month_english": "Meskerem",
"month_number": 1
}
Fields in the Response:
- day: The day of the week in Amharic (e.g., "ሰኞ" for Monday).
- month: The month name in Amharic (e.g., "መስከረም" for Meskerem).
- date: The day of the month in the Ethiopian calendar.
- year: The current Ethiopian year.
- numeric_date: The Ethiopian date in the format
day-month-year(e.g., "21-1-2017"). - day_english: The day of the week in English (e.g., "Monday").
- month_english: The month name in English (e.g., "Meskerem").
- month_number: The month number in the Ethiopian calendar (e.g., 1 for Meskerem).
How to Use the Ethiopian Date API
You can access the API by making a GET request to the following endpoint:
https://date.ethioall.com/api/date
This will return the current Ethiopian date and additional information in JSON format.
Example Request with cURL
curl -X GET https://date.ethioall.com/api/date
Examples in Different Programming Languages
PHP Example
// dont forget php tags
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://date.ethioall.com/api/date");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if ($response !== false) {
$data = json_decode($response, true);
echo "Ethiopian Date: {$data['date']} {$data['month']} {$data['year']}\n";
}
curl_close($ch);
?>
Python Example
import requests
url = "https://date.ethioall.com/api/date"
response = requests.get(url)
if response.status_code == 200:
data = response.json()
print(f"Ethiopian Date: {data['date']} {data['month']} {data['year']}")
JavaScript (Node.js) Example
const axios = require('axios');
axios.get('https://date.ethioall.com/api/date')
.then((response) => {
console.log(response.data);
});
Ruby Example
require 'net/http'
require 'json'
url = URI.parse("https://date.ethioall.com/api/date")
response = Net::HTTP.get(url)
data = JSON.parse(response)
puts data
Error Handling
The API responds with an HTTP status code. Common error codes:
- 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.
Use Cases
- Integrate into websites to display the current Ethiopian date.
- Use in mobile applications to show Ethiopian dates.
- Develop cultural and religious applications.
- Provide educational platforms with Ethiopian date details.
- Create tools for Ethiopian date conversion and comparison.