Giter Site home page Giter Site logo

hijricalendar-master's Introduction

This is old now and not maintained and probably doesnt work perfectly anymore

Hijri (Islamic) Calendar

HijriCalendar is a fragment made from the Caldroid fragment by thomasdao. Made Originally for my app [Muslim Zone] (https://play.google.com/store/apps/details?id=com.sahaab.android.muslimzone.donation).

It has the same functions as Caldroid and more. You can get Islamic Dates for a certain date and many other functions.

Sources

Caldroid : https://github.com/roomorama/Caldroid
Umm Al Qura Islamic Calendar : https://gist.github.com/fatfingers/6492017

Instructions

This is mainly built for eclipse, on eclipse. To use on eclipse, 1 - download the Project and import it into eclipse 2 - To use in your project, reference the child library project as a library, by going to your apps properties - > Android - > and the add as library 3 - Then simply in you activity file, add this code

    final CaldroidFragment caldroidFragment = new CaldroidFragment();
    Bundle args = new Bundle();
    Calendar cal = Calendar.getInstance();
    args.putInt(CaldroidFragment.MONTH, cal.get(Calendar.MONTH) + 1);
    args.putInt(CaldroidFragment.YEAR, cal.get(Calendar.YEAR));
    caldroidFragment.setArguments(args);

        
    FragmentTransaction t = getSupportFragmentManager().beginTransaction();
    t.replace(R.id.calendar1, caldroidFragment);
    t.commit();

and in your activity layout add

	<LinearLayout
		android:id="@+id/calendar1"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@+id/HijriDateCalendar"
		android:orientation="vertical" >
	</LinearLayout> 

For More Detailed Instructions - Please Look at the sample app, or the README_CALDROID.md file

To Get HijriDate - You have 4 options to get the Hijri Dates

	public static String getSimpleDate(Calendar cal, String valuechange) returns Full Date (e.g 17 Muharram 1436)
	
	public static String getSimpleDateDay(Calendar cal, String valuechange) returns Date
	
	public static String getSimpleDateMonth(Calendar cal, String valuechange) returns Month
	
	public static String getSimpleDateYear(Calendar cal, String valuechange) returns Year

Accepted Strings for valuechange are

any integer

To use, simply use code e.g for current date

HijriCalendarDate.getSimpleDate(Calendar.getInstance(),"0")

License

See LICENSE.md

hijricalendar-master's People

Contributors

sahaab avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.