CopyPastor

Detecting plagiarism made easy.

Score: 0.8769538080758641; Reported for: String similarity Open both answers

Possible Plagiarism

Reposted on 2024-02-08
by emad oun

Original Post

Original - Posted on 2024-02-08
by emad oun



            
Present in both answers; Present only in the new answer; Present only in the old answer;

fun checkIfInRangeOfHours(startHour: String, endHour: String): Boolean { val currentTime = Calendar.getInstance().time val currentDate = SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH).format(currentTime) val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd hh:mm", Locale.ENGLISH) val startDate: Date? = simpleDateFormat.parse("$currentDate $startHour") val endDate: Date? = simpleDateFormat.parse("$currentDate $endHour") return Date().after(startDate) && Date().before(endDate) }
fun checkIfInRangeOfHours(startHour: String, endHour: String): Boolean { val currentTime = Calendar.getInstance().time val currentDate = SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH).format(currentTime) val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd hh:mm", Locale.ENGLISH) val startDate: Date? = simpleDateFormat.parse("$currentDate $startHour") val endDate: Date? = simpleDateFormat.parse("$currentDate $endHour") return Date().after(startDate) && Date().before(endDate) }

        
Present in both answers; Present only in the new answer; Present only in the old answer;