getodk / collect

ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨
https://docs.getodk.org/collect-intro
Other
718 stars 1.38k forks source link

Add Burmese (Myanmar) date widget #2588

Closed aurdipas closed 5 years ago

aurdipas commented 6 years ago

Add appearance burmese similar to ethiopian #1505.

https://en.wikipedia.org/wiki/Burmese_calendar

The goal is for the widget to look like other calendar widgets and to use standard Android components as much as possible. Ideally this will involve creating a new Joda chronology just like for the EthiopicChronology .

There is a repo with MIT license that can be used https://github.com/chanmratekoko/mmcalendar .

getodk-bot commented 6 years ago

Hello @grzesiek2010, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 15 days.

You can reclaim this issue or claim any other issue by commenting @opendatakit-bot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

DreamyPhobic commented 6 years ago

@opendatakit-bot claim

grzesiek2010 commented 6 years ago

Hi @DreamyPhobic

the work of this issue is in progress using this I was just removed because I ran into some issues and wait for answers from the author of https://github.com/chanmratekoko/mmcalendar.

Please take one of the other issues.

DreamyPhobic commented 6 years ago

ok @grzesiek2010 no problem...Thanks.

DreamyPhobic commented 6 years ago

@opendatakit-bot unclaim

getodk-bot commented 6 years ago

ERROR: You have not claimed this issue to work on yet.

getodk-bot commented 6 years ago

Hello @grzesiek2010, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 15 days.

You can reclaim this issue or claim any other issue by commenting @opendatakit-bot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

aurdipas commented 5 years ago

Any update @grzesiek2010 ?

grzesiek2010 commented 5 years ago

No. The problem is with the repo we used https://github.com/chanmratekoko/mmcalendar/issues/1 so I hope the author is going to fix bugs.

chanmratekoko commented 5 years ago

No. The problem is with the repo we used chanmratekoko/mmcalendar#1 so I hope the author is going to fix bugs.

Hi @grzesiek2010

You can use with this version.

<dependency>
  <groupId>com.github.chanmratekoko</groupId>
  <artifactId>myanmar-calendar</artifactId>
  <version>1.0.6.RC3</version>
</dependency>

And also you can test with this code.

        int mmYear = 1358;

        String[] ema = { "First Waso", "Tagu", "Kason", "Nayon", "Waso", "Wagaung", "Tawthalin", "Thadingyut",
                "Tazaungmon", "Nadaw", "Pyatho", "Tabodwe", "Tabaung", "Late Tagu", "Late Kason" };

        MyanmarMonths myanmarMonths = MyanmarDateKernel.getMyanmarMonth(mmYear, 1);
        List<Integer> monthIndexes = myanmarMonths.getIndex();

        for (int index = 0; index < monthIndexes.size(); index++) {
            Integer monthIndex = monthIndexes.get(index);
            double julianDate = 0;
            if (index == 0) {
                Thingyan thingyan = ThingyanCalculator.getThingyan(mmYear);
                double newYearDay = thingyan.getMyanmarNewYearDay(); // Myanmar new year day
                julianDate = newYearDay;
            } else {
                julianDate = MyanmarDateKernel.m2j(mmYear, monthIndex, 1);
            }

            MyanmarDate myanmarDate = MyanmarDateKernel.j2m(julianDate);
            WesternDate westernDate = WesternDateConverter.convert(myanmarDate);

            System.out.println(" MY: " + myanmarDate.getYearInt() + " MMI: " + monthIndex + " WY: "
                    + westernDate.getYear() + " WMI: " + westernDate.getMonth() + " Day " + westernDate.getDay());
        }

Hopefully, It can help you.

If you have any questions, please feel free to ask me.