package bou.amine.apps.readerforselfossv2.utils

import bou.amine.apps.readerforselfossv2.model.SelfossModel
import bou.amine.apps.readerforselfossv2.service.AppSettingsService


fun SelfossModel.Item.parseDate(dateUtils: DateUtils): Long =
    dateUtils.parseDate(this.datetime)

expect class DateUtils constructor(appSettingsService: AppSettingsService) {
    val appSettingsService: AppSettingsService // This is needed because of https://stackoverflow.com/a/65249085

    fun parseDate(dateString: String): Long

    fun parseRelativeDate(dateString: String): String
}
