Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JalaliDatePicker #54

Closed
FarajiMehrdad opened this issue Jul 9, 2015 · 13 comments
Closed

JalaliDatePicker #54

FarajiMehrdad opened this issue Jul 9, 2015 · 13 comments
Labels

Comments

@FarajiMehrdad
Copy link

I want contribute in MaterialDateTimePicker to create jalali Calendar(https://en.wikipedia.org/wiki/Jalali_calendar
) , but I don't know
how I can do this!
can you help me how can start this?

@wdullaer
Copy link
Owner

I'm not sure what you want me to do here.
I do not know this calendar system, or how it is visualised. This library is relying on the built-in java Calendar classes. If they do not have support for this calendar system, then it will be hard to add support. If they do, then the native android localisation should take care of it mostly.

@FarajiMehrdad
Copy link
Author

I write jalali calendar and I know how is work,
but I don't know which class and which function in MaterialDateTimePicker should change?!
if you pleasure and guide me how can change calendar , I can do this.
thank you

@wdullaer
Copy link
Owner

I don't know this calendar system, nor how it is visualised, so I have no idea what you need to change.

The library relies heavily on the default java calendar classes, so unless those offer out of the box support, I'm afraid this will be a large undertaking.

@Suall1969
Copy link

@FarajiMehrdad There is really not much @wdullaer can do about it.
It is simple, You just need to import the module into your Android Studio project, and change the Month strings to "Farvardin", "Ordibehesht", ... then, make use of the JDF class to convert Julian dates to Persian dates as described here: http://stackoverflow.com/a/18076919

BTW, you can just use the https://github.com/alirezaafkar/SunDate_Picker if you want to preserve your time.

@wdullaer Thanks for the great design of pickers.

UPDATE:
Recently, Mohamad Amin ported this library to Shamsi and ended up with this:
https://github.com/mohamad-amin/PersianMaterialDateTimePicker

@wdullaer
Copy link
Owner

If you can make it a pull request, I can try to incorporate this into the library.

@Suall1969
Copy link

Pleasure, but then it would not support Julian dates anymore.

@wdullaer
Copy link
Owner

wdullaer commented Aug 1, 2015

That depends on how you've done it I guess.

In any case, I'm happy people are getting good use out of this :-)

@FarajiMehrdad
Copy link
Author

YA , tanks Saull , I do it

@SaeedZhiany
Copy link
Contributor

Hi guys,

I found a library that uses this library and extend it with the Jalali calendar system. you can check it out

but there is a problem, its last commit is about 7 months ago and there might be lots of pickers related bugs in there that already have been resolved in this repository,
Can you guys help me to combine its change into this repository and add Jalali Calendar system directly in this main repository?

by this, we can always use the latest updates of pickers and having Jalali calendar system beside the Gregorian calendar system.

cc @FarajiMehrdad

@SaeedZhiany
Copy link
Contributor

@wdullaer

I have started to compare the two repositories and add the codes that related to Jalali calendar system into your codes. but because the other library in not up-to-date, in some situations I can't recognize which line is for codes and which line is not. can you also help with this to me?
you know your codes and you can easily find out which lines in the other library is not up-to-date according to your current repository.

@wdullaer
Copy link
Owner

wdullaer commented Oct 5, 2019

Thanks for taking the time to look into this.

I haven't had a lot of time to work on this library in the last year. I am doing basic maintenance, but that's really all I have time for at this time.
I will try to review your PR's and help with structure and design. As long as you're willing to incorporate feedback, your PR doesn't need to be perfect.

@SaeedZhiany
Copy link
Contributor

Thank you for you great library, recently I tried and merge the other library into yours and fixed some of its bug causing by merge them together (that already has not been resolved yet in @mohseneo's repository)
it currently works great, but I like to have locales for Jalali calendar as well (Persian and English at least) but it's so hard to manage the code with the current structure of code. so maybe I send my current branch as a separated PR in the next few days and start to replace Android's built-in calendar system. I already have found a great library called Time4A by @MenoData that does support many calendar systems around the world with many locales for each calendar system. by that this library can support many calendar systems automatically.

I don't know how much time I can spend on this so anyone that can help please let me know to work together.

@SaeedZhiany
Copy link
Contributor

I have submitted a PR for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants