Skip to content

filelucker/english-date-to-bangla-date

Repository files navigation

English To Bangla Date Library

The English Calendar Date to Bangla Calendar Date Library is a reliable and efficient tool for converting dates from the English calendar system to the Bangla calendar system. With accurate conversion, seamless integration, and flexible customization options, this library simplifies the process of date conversion for developers and individuals working with the Bangla calendar.

To get a Git project into your build:

Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

add this to build.gradle (Module: app) or if you are using "Android Studio Arctic Fox" or heigher add this to settings.gradle (Project Settings)

Step 2. Add the dependency

	dependencies {
		...
	        implementation 'com.github.filelucker:english-date-to-bangla-date:1.1.1'
		...
	}

Usage

import com.filelucker.englishdatetobangladate.Bangla

Create an Object

val bangla = Bangla()

Get result from object

//Input englishYear, englishMonth, englishDay are integer value 
val res = bangla.getBanglaDate(englishYear, englishMonth, englishDay)   // Return format "MMM DD, YYYY" format.  e.g. BOISHAKH 18, 1429

//Input banglaYear, banglaMonth, banglaDay are integer value 
val res = bangla.getEnglishDate(banglaYear, banglaMonth, banglaDay)     // Return format "MMM DD, YYYY" format.  e.g. JANUARY 18, 2023
val month = res.getMonth()!!.banglaName  // e.g. বৈশাখ

Share this release: