kizitonwose / Calendar

A highly customizable calendar view and compose library for Android and Kotlin Multiplatform.
MIT License
4.67k stars 505 forks source link

Unresolved reference: displayText #493

Closed PRANAV62486 closed 1 year ago

PRANAV62486 commented 1 year ago

Library information:

Describe the bug**

I was trying to implement Example5 of sample project and faced the issue "Unresolved reference: displayText". Basically displayText() method from YearMonth class is now not available.

To Reproduce (if applicable)

Steps to reproduce the behavior:

  1. Go to 'Example5Fragment.kt'
  2. Try to implement base class named "Example5Fragment" extending BaseFragment
  3. now check the line no 104 of this file : "https://github.com/kizitonwose/Calendar/blob/main/sample/src/main/java/com/kizitonwose/calendar/sample/view/Example5Fragment.kt"
  4. In this line displayText() method is not available "binding.exFiveMonthYearText.text = month.yearMonth.displayText()"

Expected behavior (if applicable)

It should be available

Screenshots? (if applicable)

image

kizitonwose commented 1 year ago

This is an extenesion function in the sample:

fun YearMonth.displayText(short: Boolean = false): String {
    return "${this.month.displayText(short = short)} ${this.year}"
}