alamkanak / Android-Week-View

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.
Apache License 2.0
3.42k stars 1.23k forks source link

how to add other calendar formats? like jalali (persian) calender #480

Open mr-sarsarabi opened 6 years ago

mr-sarsarabi commented 6 years ago

This current library uses Gregorian calendar format by default. Is there a way to change this format and use jalali calendar format?

droidstered commented 6 years ago

I think using locale you can change it.

mr-sarsarabi commented 6 years ago

@droidstered can you give me more info about this locale? I mean what should I do?

aliardalan commented 5 years ago

https://github.com/siavash-sajjad/Persian-Week-View

rezazarchi commented 2 years ago

You can set the interpreter which provides the text to show in the header column and the header row.

        mWeekView.dateTimeInterpreter = object : DateTimeInterpreter {
            override fun interpretDate(date: Calendar): String {
                return ConvertToPersianCalendar(date)
            }

            override fun interpretTime(hour: Int): String {
                return hour.toString()
            }
        }