io.github.wulkanowy.sdk.scrapper.conferences.ConferencesMapper.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-scrapper Show documentation
Show all versions of sdk-scrapper Show documentation
Unified way of retrieving data from the UONET+ register through mobile api and scraping api
package io.github.wulkanowy.sdk.scrapper.conferences
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
private val dateFormatter = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm")
internal fun List.mapConferences(): List = map {
val dateString = it.place.split(",")[1].trim().replace(" godzina", "")
it.copy(
place = it.place.substringAfter(", ").substringAfter(", "),
date = LocalDateTime.parse(dateString, dateFormatter),
)
}.sortedBy { it.date }
© 2015 - 2024 Weber Informatics LLC | Privacy Policy