search

Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Find Other Calendars and Epoch API

The Find Other Calendars and Epoch API allow you to derive equivalent dates and epoch-based values across multiple calendar and timekeeping systems used in Indian astrology and related calendrical computations. This is useful when you need to show Kaliyuga year, Shaka year, Julian day, or Nirayana dates alongside a Gregorian date for astrological, cultural, or archival purposes.


Step-by-Step Find Other Calendars and Epoch API Postman Testing Integration

For a guided walkthrough on how to test this API using Postman, refer to the official support documentation:

Step by Step Find Other Calendars and Epoch API Postman Testing Integration
https://support.divineapi.com/indian-astrology-apis/testing-panchang-api-find-other-calendars-and-epoch-api-using-postman


Supported Language Codes

You can localize the API response by passing the lan parameter in the request body.

Reference Article:
https://support.divineapi.com/general-api-support/translating-an-indian-vedic-apis-into-a-different-language

CodeLanguage
enEnglish
hiHindi
bnBengali
maMarathi
tmTamil
tlTelugu
mlMalayalam
knKannada

Guide: If lan is not provided, the API will return the response in English (en) by default.


API Endpoint

POST https://astroapi-2.divineapi.com/indian-api/v2/find-other-calendars-and-epoch

This endpoint returns equivalent values for multiple calendar systems and epoch counts for the provided date and location.


Headers

NameTypeDescription
Authorization*StringYour API Access Token. Example: Bearer {token}

The asterisk (*) denotes a required field.


Request Body

NameTypeRequiredDescription
api_key*StringYesYour DivineAPI key.
day*IntegerYesDay of panchang/date. Example: 24.
month*IntegerYesMonth of panchang/date. Example: 05.
year*IntegerYesYear of panchang/date. Example: 2023.
placeStringNoLocation name, e.g. New Delhi.
lat*FloatYesLatitude, e.g. 28.6139.
lon*FloatYesLongitude, e.g. 77.2090.
tzone*FloatYesTimezone, e.g. 5.5. See timezone guide: https://developers.divineapi.com/divine-api/understanding-time-zones-a-comprehensive-guide
lanStringNoLanguage code from the supported list. Defaults to en.

200: OK Other Calendars & Epoch fetched successfully

{
    "success": 1,
    "data": {
        "kaliyuga": "5124 Years",
        "lahiri_ayanamsha": "24.27016",
        "julian_day": "2460088.5 Days",
        "modified_julian_day": "60088 Days",
        "julian_date": "May 11, 2023 CE",
        "national_nirayana_date": "Jyeshtha 10, 1945 Shaka",
        "rata_die": 738664,
        "national_civil_date": "Jyeshtha 5, 1945 Shaka",
        "kali_ahargana": "1871623 Days"
    }
}

Field Explanation

kaliyuga
The elapsed years in the Kaliyuga era calculated for the given date.

lahiri_ayanamsha
The Lahiri (Chitrapaksha) ayanamsha value for that date, useful for sidereal calculations.

julian_day
The Julian Day Number (JDN) corresponding to the date and time.

modified_julian_day
The Modified Julian Day (MJD), often used in astronomical and scientific contexts.

julian_date
The Gregorian/Julian calendar formatted date equivalent.

national_nirayana_date
The Indian national (nirayana) calendar date (often used in Vedic/astrological Panchang frameworks).

national_civil_date
The Indian national civil calendar date.

rata_die
A continuous day count used in certain calendrical computations.

kali_ahargana
Day count since the beginning of the Kali era.

Usage Notes

Always pass accurate lat, lon, and tzone to get location-aware calendrical data.

This API is especially useful when you want to display “astrology-friendly” dates alongside “civil” dates.

You can combine this API with Panchang-related endpoints to build a complete daily astrological panel.


Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-2.divineapi.com/indian-api/v2/find-other-calendars-and-epoch' \
--header 'Authorization: Bearer {Your Auth Token}' \
--form 'api_key="{Your API Key}"' \
--form 'day="24"' \
--form 'month="05"' \
--form 'year="2023"' \
--form 'place="New Delhi"' \
--form 'lat="28.6139"' \
--form 'lon="77.2090"' \
--form 'tzone="5.5"' \
--form 'lan="en"'

Node.js

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-2.divineapi.com/indian-api/v2/find-other-calendars-and-epoch',
  'headers': {
    'Authorization': 'Bearer {Your Auth Token}'
  },
  formData: {
    'api_key': '{Your API Key}',
    'day': '24',
    'month': '05',
    'year': '2023',
    'Place': 'New Delhi',
    'lat': '28.6139',
    'lon': '77.2090',
    'tzone': '5.5',
    'lan': 'en'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

JavaScript (jQuery AJAX)

var form = new FormData();
form.append("api_key", "{Your API Key}");
form.append("day", "24");
form.append("month", "05");
form.append("year", "2023");
form.append("Place", "New Delhi");
form.append("lat", "28.6139");
form.append("lon", "77.2090");
form.append("tzone", "5.5");
form.append("lan", "en");

var settings = {
  "url": "https://astroapi-2.divineapi.com/indian-api/v2/find-other-calendars-and-epoch",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {Your Auth Token}"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Python

import requests

url = "https://astroapi-2.divineapi.com/indian-api/v2/find-other-calendars-and-epoch"

payload = {'api_key': '{Your API Key}',
'day': '24',
'month': '05',
'year': '2023',
'Place': 'New Delhi',
'lat': '28.6139',
'lon': '77.2090',
'tzone': '5.5',
'lan': 'en'}

headers = {
  'Authorization': 'Bearer {Your Auth Token}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Implementation Tips

Validate user input for day, month, and year before sending to the API.

Display both civil and traditional dates to enhance user understanding.

Cache responses per date and location where appropriate to reduce API calls.

Use the lan parameter to serve multilingual user bases without changing your backend logic.