samanzamani / PersianDate

Persian date for android
BSD 3-Clause "New" or "Revised" License
330 stars 40 forks source link

The date explicitly set is changed #7

Closed saied89 closed 6 years ago

saied89 commented 6 years ago

Hi Thanks for the great tool :) I explicitly set the shYear, shMonth and shDay. and then it is changed by a day! This is the example unit test:

    @Test
    fun persianDateTest() {
        val persianDate = PersianDate().apply {
            shYear = 1368
            shMonth = 8
            shDay = 1
        }

        assertEquals(persianDate.shYear, 1368)
        assertEquals(persianDate.shMonth, 8)
        assertEquals(persianDate.shDay, 1)
    }

the date set on persianDate is 30/7/1368

samanzamani commented 6 years ago

This problem fixed in version 0.2 and up. check this #4