Support years ago in raw sites. (#795)

Support years ago in raw sites.
This commit is contained in:
DitFranXX 2019-02-10 01:29:31 +09:00 committed by Carlos
parent 8734222bd0
commit f6d3a2c916
4 changed files with 12 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: RawQQ' appName = 'Tachiyomi: RawQQ'
pkgNameSuffix = 'ja.rawqq' pkgNameSuffix = 'ja.rawqq'
extClass = '.Rawqq' extClass = '.Rawqq'
extVersionCode = 2 extVersionCode = 3
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -143,6 +143,11 @@ class Rawqq : ParsedHttpSource() {
set(Calendar.SECOND, 0) set(Calendar.SECOND, 0)
set(Calendar.MILLISECOND, 0) set(Calendar.MILLISECOND, 0)
}.timeInMillis }.timeInMillis
"year(s) ago" in date -> Calendar.getInstance().apply {
add(Calendar.YEAR, value * -1)
set(Calendar.SECOND, 0)
set(Calendar.MILLISECOND, 0)
}.timeInMillis
else -> { else -> {
return 0 return 0
} }

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: RawLH' appName = 'Tachiyomi: RawLH'
pkgNameSuffix = 'ja.rawlh' pkgNameSuffix = 'ja.rawlh'
extClass = '.Rawlh' extClass = '.Rawlh'
extVersionCode = 7 extVersionCode = 8
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -137,6 +137,11 @@ class Rawlh : ParsedHttpSource() {
set(Calendar.SECOND, 0) set(Calendar.SECOND, 0)
set(Calendar.MILLISECOND, 0) set(Calendar.MILLISECOND, 0)
}.timeInMillis }.timeInMillis
"years ago" in date -> Calendar.getInstance().apply {
add(Calendar.YEAR, value * -1)
set(Calendar.SECOND, 0)
set(Calendar.MILLISECOND, 0)
}.timeInMillis
else -> { else -> {
return 0 return 0
} }