We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab666b2 commit 70d00d0Copy full SHA for 70d00d0
1 file changed
utils/src/main/java/com/streamliners/utils/DateTimeUtils.kt
@@ -57,6 +57,10 @@ object DateTimeUtils {
57
)
58
}
59
60
+ fun parse(format: Format, time: String, lenient: Boolean = false): Date {
61
+ return parseFormattedTime(format, time, lenient).time
62
+ }
63
+
64
fun parseFormattedTime(format: Format, time: String, lenient: Boolean = false): Calendar {
65
val date = SimpleDateFormat(format.pattern, Locale.getDefault())
66
.run { isLenient = lenient; this }
0 commit comments