Git Product home page Git Product logo

androidmulticalendartools's Introduction

Android multi calender tools library for android

android date tools and date picker for tree calendar systems Jalali , Hijri , Gregorian

Screen shots

primary color will be your theme color

Add to your project

copy this to "yourProject/app/libs"
have problem?

How to use

date converter: more here.

DateModel hijri = DateConverter.GregorianToHijri(2018, 1, 1);
//hijri.day;
//hijri.month;
//hijri.year;

date picker:
xml:(don't change height and width)

<com.ali.uneversaldatetools.datePicker.UDatePicker
        android:id="@+id/date_picker"
        android:layout_width="300dp"
        android:layout_height="350dp"/>

java:

UDatePicker uDatePicker = findViewById(R.id.date_picker);

//push date to show in first time
uDatePicker.ShowDatePicker(dateSystem);

//or use current date
uDatePicker.ShowDatePicker(Calendar.Jalali);

//get on day selected event
uDatePicker.setOnDateSelected((dateSystem, unixTime) -> {
    //do something...
});

//or get date when ever you want
uDatePicker.getSelectedUnixTime();//as a unix time
uDatePicker.getSelectedDate();//as a DateSystem object

Supported language:

1.persian
2.english
and its easy to add new language see here.

LICENCE

under MIT licence

androidmulticalendartools's People

Contributors

ali77gh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

androidmulticalendartools's Issues

hijri date problem

hijri have one day error because 1439 is not Leap but IsHijriLeap() return true

make program crash باعث کرش برنامه می شود

Hi. It makes the program crash on some date. for example: on 23 June 2020 it returns an incorrect date for Hijri month. it crashes because I have used returned month number in an array and when this number be out of array domain, make the program crash. thanks

سلام. در بعضی از تاریخ ها درست کار نمیکند و بعضی موارد هم باعث ایجاد کرش برنامه دلیل برگرداندن عدد اشتباه برای ما می شود. مثلا در تاریخ 23 ژوئن 2020 عددی که برای ماه قمری برمیگرداند اشتباه است و باعث کرش برنامه خواهد شد. کرش برنامه هم به این دلیله که من از این عدد در یک آرایه استفاده کردم و وقتی که عدد خارج از بازه آرایه باشه برنامه کرش میکنه. ممنون

Jalali issue

salam. dar tarikhe 31/1/2022 vaghti mikhad tarikh ro be jalali neshoon bede, bejaye 11 bahman, 14 bahman ro neshoon mide uDatePicker.ShowDatePicker(Calendar.Jalali);

dialog mode

crash when used in dialog

can not cast context to activity in method init()

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.