All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.wulkanowy.sdk.scrapper.conferences.ConferencesMapper.kt Maven / Gradle / Ivy

Go to download

Unified way of retrieving data from the UONET+ register through mobile api and scraping api

There is a newer version: 2.7.0
Show newest version
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