Upgraded to Gradle 7.1.
This commit is contained in:
parent
4c4f7da0da
commit
eb14e72255
20 changed files with 139 additions and 48 deletions
|
@ -49,17 +49,17 @@ import java.math.RoundingMode
|
|||
* @param plural The value to be appended if the reading time is more than 1 minute.
|
||||
* @param excludeImages Images are excluded from the reading time when set.
|
||||
* @param extra Additional seconds to be added to the total reading time.
|
||||
* @param round The [RoundingMode] to apply. Default is [RoundingMode.HALF_DOWN].
|
||||
* @param roundingMode The [RoundingMode] to apply. Default is [RoundingMode.HALF_DOWN].
|
||||
*/
|
||||
class ReadingTime @JvmOverloads constructor(
|
||||
text: String,
|
||||
wpm: Int = 275,
|
||||
var postfix: String = "min read",
|
||||
var plural: String = "min read",
|
||||
excludeImages: Boolean = false,
|
||||
extra: Int = 0,
|
||||
var roundingMode: RoundingMode = RoundingMode.HALF_EVEN
|
||||
) {
|
||||
text: String,
|
||||
wpm: Int = 275,
|
||||
var postfix: String = "min read",
|
||||
var plural: String = "min read",
|
||||
excludeImages: Boolean = false,
|
||||
extra: Int = 0,
|
||||
var roundingMode: RoundingMode = RoundingMode.HALF_EVEN
|
||||
) {
|
||||
companion object {
|
||||
private const val INVALID: Double = -1.0
|
||||
|
||||
|
@ -110,7 +110,7 @@ class ReadingTime @JvmOverloads constructor(
|
|||
}
|
||||
|
||||
/**
|
||||
* Calculates and returns the reading time in seconds.
|
||||
* Calculates and returns the reading time in seconds.
|
||||
*
|
||||
* `((word count / wpm) * 60) + images + extra`
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<taglib version="2.0"
|
||||
<taglib xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
version="2.0"
|
||||
xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd">
|
||||
<tlib-version>1.0</tlib-version>
|
||||
<short-name>ReadingTime</short-name>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue