Added new date format for readmanga/mintmanga (#724)
Added new date format for readmanga/mintmanga
This commit is contained in:
parent
75625d6931
commit
0a917249f8
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: Mintmanga'
|
||||
pkgNameSuffix = 'ru.mintmanga'
|
||||
extClass = '.Mintmanga'
|
||||
extVersionCode = 8
|
||||
extVersionCode = 9
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import okhttp3.Response
|
|||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import java.text.SimpleDateFormat
|
||||
import java.text.ParseException
|
||||
import java.util.*
|
||||
import java.util.regex.Pattern
|
||||
|
||||
|
@ -114,7 +115,11 @@ class Mintmanga : ParsedHttpSource() {
|
|||
chapter.name = urlText
|
||||
}
|
||||
chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
|
||||
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
||||
try {
|
||||
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
||||
} catch (e: ParseException) {
|
||||
SimpleDateFormat("dd.MM.yy", Locale.US).parse(it).time
|
||||
}
|
||||
} ?: 0
|
||||
return chapter
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: Readmanga'
|
||||
pkgNameSuffix = 'ru.readmanga'
|
||||
extClass = '.Readmanga'
|
||||
extVersionCode = 8
|
||||
extVersionCode = 9
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import okhttp3.Response
|
|||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import java.text.SimpleDateFormat
|
||||
import java.text.ParseException
|
||||
import java.util.*
|
||||
import java.util.regex.Pattern
|
||||
|
||||
|
@ -114,7 +115,11 @@ class Readmanga : ParsedHttpSource() {
|
|||
chapter.name = urlText
|
||||
}
|
||||
chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
|
||||
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
||||
try {
|
||||
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
||||
} catch (e: ParseException) {
|
||||
SimpleDateFormat("dd.MM.yy", Locale.US).parse(it).time
|
||||
}
|
||||
} ?: 0
|
||||
return chapter
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue