10000 GitHub - phothinmg/thetkarit: The Burmese calendar calculations
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

phothinmg/thetkarit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pk

Thetkarit

GitHub License

Overview

The Burmese calendar calculations focus on Burmese calendar and astronomy studies and are still in progress.

Most of the code here is in the public domain or released under an open source license, though some code and/or data may be under other copyright (usually an open source license), see Resources.


Node Js (JavaScript/TypeScript)

Status

NPM Version GitHub Actions Workflow Status GitHub Actions Workflow Status

Install

npm i thetkarit
yarn add thetkarit
pnpm add thetkarit

Usage

import { BurmeseCal } from "thetkarit"; // esm

const { BurmeseCal } = require("thetkarit"); //common js

const bcal = new BurmeseCal();

API Docs : https://tsdocs.dev/docs/thetkarit/latest/index.html


Browser (JavaScript)

Status

GitHub Actions Workflow Status

jsDelivr : https://www.jsdelivr.com/package/npm/thetkarit

<script src="https://cdn.jsdelivr.net/npm/thetkarit/cdn/index.min.js"></script>

C++

Status

GitHub Actions Workflow Status GitHub Actions Workflow Status GitHub Actions Workflow Status

Useage

Download latest thetkarit.zip from here.

#include "thetkarit/bcal.hpp" // include bcal header
#include <iostream>
#include <iomanip>

/// @brief Gregorian Calendar Date to Burmese Calendar Date
int main()
{
    bcal::BcalInfo dv = bcal::day_v(2025, 2, 12).bcal_info;
    std::cout << "Sasana Year: " << std::setprecision(0) << dv.sasana_year << std::endl;
    std::cout << "Burmese Year: " << std::setprecision(0) << dv.burmese_year << std::endl;
    std::cout << "Burmese Month: " << dv.burmese_month_str << std::endl;
    std::cout << "Moon Phase: " << dv.moon_phases_str << std::endl;
    std::cout << "Fortnight Day: " << std::setprecision(0) << dv.fortnight_day << std::endl;
    std::cout << "Day in Burmese Month: " << std::setprecision(0) << dv.burmese_day << std::endl;
    std::cout << "Public Holidays: ";
    for (const auto &holiday : dv.public_holiday)
    {
        std::cout << holiday << std::endl;
    }
}
Sasana Year: 2568
Burmese Year: 1386
Burmese Month: Tabodwe
Moon Phase: Waxing
Fortnight Day: 12
Day in Burmese Month: 12
Public Holidays: Union Day

Example C++ program

Clone the repository and build it using cmake, and run;

git clone https://github.com/phothinmg/thetkarit.git
cd thetkarit
mkdir build
cd build
cmake ..
make
./bcal # Running example

Resources

Burmese Calendar

Julian Date and Moon Phases


0