Android-Week-View icon indicating copy to clipboard operation
Android-Week-View copied to clipboard

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

Open mr-sarsarabi opened this issue 7 years ago • 4 comments

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

mr-sarsarabi avatar Jan 30 '18 06:01 mr-sarsarabi

I think using locale you can change it.

droidstered avatar Jan 30 '18 08:01 droidstered

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

mr-sarsarabi avatar Jan 30 '18 08:01 mr-sarsarabi

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

aliardalan avatar Nov 12 '18 05:11 aliardalan

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()
            }
        }

rezazarchi avatar Oct 26 '21 06:10 rezazarchi