Skip to main content

Convert Gregorian date to Kollavarsham date and vice versa

Project description


Circle CI Status Travis CI Status Coverage Status Dependency Status Dev-Dependency Status FOSSA Status

Convert Gregorian date to Kollavarsham date and vice versa


TypeScript/JavaScript/Node.js NPM version

$ npm install kollavarsham

Python PyPI version

$ pip install kollavarsham

Java Maven version


C#/dotnet NuGet version

$ dotnet add package KollavarshamOrg.Converter



import { Kollavarsham } from 'kollavarsham';

const options = {
  system: 'SuryaSiddhanta',
  latitude: 10,
  longitude: 76.2

const kollavarsham = new Kollavarsham(options);

const today = kollavarsham.fromGregorianDate(new Date());

console.log(today.year, today.mlMasaName,, `(${today.mlNaksatraName})`);


import datetime
import pytz
import kollavarsham

now = pytz.utc.localize(datetime.datetime.utcnow())
kv = kollavarsham.Kollavarsham(latitude=10, longitude=76.2, system="SuryaSiddhanta")

today = kv.from_gregorian_date(date=now)
print(today.year, today.ml_masa_name,, '(' + today.naksatra.ml_malayalam + ')')


package org.kollavarsham.tester;

import java.time.Instant;

import org.kollavarsham.converter.Kollavarsham;
import org.kollavarsham.converter.KollavarshamDate;
import org.kollavarsham.converter.Settings;
import org.kollavarsham.converter.Settings.Builder;

public class App {
    public static void main( final String[] args) {
        final Settings settings = new Builder().latitude(10).longitude(76.2).system("SuryaSiddhanta").build();
        final Kollavarsham kv = new Kollavarsham(settings);
        final KollavarshamDate today = kv.fromGregorianDate(;
        System.out.println( today.getYear() + today.getMlMasaName() + today.getDate() + '(' + today.getMlNaksatraName() + ')' );


using System;

namespace KollavarshamOrg.Tester
    class Program
        static void Main(string[] args)
            var settings = new Settings {
                Latitude = 10,
                Longitude = 76.2,
                System = "SuryaSiddhanta"
            var kv = new Kollavarsham(settings);
            var today = kv.FromGregorianDate(DateTime.Now);
            Console.WriteLine($"{today.Year.ToString()} {today.MlMasaName} {today.Date.ToString()} ({today.MlNaksatraName})");



Check out the Kollavarsham class within the API documentation as this is the entry point into the library.

Release History

Check out the history at GitHub Releases


Copyright (c) 2014-2022 The Kollavarsham Team. Licensed under the MIT license.

FOSSA Status

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kollavarsham-2.4.3.tar.gz (79.6 kB view hashes)

Uploaded source

Built Distribution

kollavarsham-2.4.3-py3-none-any.whl (78.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page