Welcome to mirror list, hosted at ThFree Co, Russian Federation.

XAbDate.kt « property « vcard4android « bitfire « at « java « main « src - github.com/bitfireAT/vcard4android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c3de1e52d12c857da6f26428f1a13ac4e02df70a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package at.bitfire.vcard4android.property

import ezvcard.io.scribe.DateOrTimePropertyScribe
import ezvcard.property.DateOrTimeProperty
import ezvcard.util.PartialDate
import java.util.*

class XAbDate: DateOrTimeProperty {

    constructor(text: String?): super(text)
    constructor(date: Date?): super(date, false)
    constructor(partialDate: PartialDate?): super(partialDate)


    object Scribe : DateOrTimePropertyScribe<XAbDate>(XAbDate::class.java, "X-ABDATE") {

        override fun newInstance(text: String?) = XAbDate(text)
        override fun newInstance(calendar: Calendar?, hasTime: Boolean) = XAbDate(calendar?.time)
        override fun newInstance(partialDate: PartialDate?) = XAbDate(partialDate)

    }

}