Quick Start

Last updated: June 25th, 2020

API Reference

A free and simple date conversion API for developers to integrate it with your application in a way you see fit. The API is organized in REST architecture. And all endpoints are accessible via GET requests.

Usage

To Ethiopian

sending a GET request with month, date , year parameters at the following endpoint is enough. http://www.geezdate.org/api/v1/toEthiopian/convert

Default code example:

curl "http://www.geezdate.org/api/v1/toEthiopian?convert&month=10&year=2012&date=13"

StatusCode : 200
StatusDescription : OK Content : { "Status": "OK", "Data": { "Date": 3, "Month": "02", "MonthName": "ጥቅምት", "Year": 2005 } }

To Greagorian

sending a GET request with month, date , year parameters at the following endpoint is enough. curl "http://www.geezdate.org/api/v1/toGregorian/convert"

Default code example:

curl "http://www.geezdate.org/api/v1/toGregorian?convert&month=02&year=2010&date=28 "

StatusCode : 200
StatusDescription : OK
Content : { { "Status": "OK", "Data": { "Date": 7, "Month": "11", "MonthName": "November", "Year": 2017 } } }

Today

this endpoint returns the current Ethiopian date curl "http://www.geezdate.org/api/v1/today"

Default code example:

curl "http://www.geezdate.org/api/v1/today"

StatusCode : 200
StatusDescription : OK
Content : { "Status":"OK", "Data":{"Date":24, "Month":"10", "MonthName":"ሰኔ", "Year":2012 }} } }

Errors

In case of invalid input, the API will return an ERROR status with the Error Infomation.
For example if the request has an invalid input, the "Status" in the response JSON will be "ERORR" instead of "OK". But the HTTP Status code will always be 200.

curl "http://www.geezdate.org/api/v1/toEthiopian?convert&month=15&year=2012&date=13"

In this case the request has an invalid month (i.e 15).

StatusCode : 200
StatusDescription : OK
Content : { { { "Status": "ERROR", "Data": [], "ErorInfo": "Invalid Date" } } }

Code Examples

Useful Tip:

You can use PostMan to check if everything is okay before implementing it in the code

JavaScript Code Example
<script> 
$.get( 
"http://www.geezdate.org/api/v1/toGregorian/?convert", 
{ month: 10, year: 2012, date:12 }, 
function(data){
    console.log(JSON.stringify(data))
});
    
</script>
Java Code Example using Spring

@Autowired
RestTemplate restTemplate; 
// you can write your implimatation for Object mapping
...
...
String response = restTemplate.getForObject("http://www.geezdate.org/api/v1/toGregorian?convert&month=02&year=2010&date=28",
String.class);

Callouts

If you want to help out in developeing this API further please don't hesitate to contact me