Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@ bin/
.vscode/

### Mac OS ###
.DS_Store
.DS_Store

.idea
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

17 changes: 0 additions & 17 deletions .idea/gradle.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/kotlinc.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

22 changes: 11 additions & 11 deletions src/main/kotlin/YukymController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.time.format.DateTimeFormatter

class YukymController {

val nowDate = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-mm-dd"))
val nowDate = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))

lateinit var nowTime: String

Expand Down Expand Up @@ -36,16 +36,16 @@ class YukymController {

val nowTime = LocalDateTime.now()
when {
nowTime.hour >= 0 || nowTime.hour < 2 -> return timeDataOne.first().ty1
nowTime.hour >= 4 || nowTime.hour < 6 -> return timeDataOne.first().ty2
nowTime.hour >= 6 || nowTime.hour < 8 -> return timeDataOne.first().ty3
nowTime.hour >= 8 || nowTime.hour < 10 -> return timeDataOne.first().ty4
nowTime.hour >= 10 || nowTime.hour < 12 -> return timeDataOne.first().ty5
nowTime.hour >= 12 || nowTime.hour < 14 -> return timeDataOne.first().ty6
nowTime.hour >= 16 || nowTime.hour < 18 -> return timeDataOne.first().ty7
nowTime.hour >= 18 || nowTime.hour < 20 -> return timeDataOne.first().ty8
nowTime.hour >= 20 || nowTime.hour < 22 -> return timeDataOne.first().ty9
nowTime.hour >= 22 || nowTime.hour < 24 -> return timeDataOne.first().ty10
nowTime.hour >= 0 && nowTime.hour < 2 -> return timeDataOne.first().ty1
nowTime.hour >= 4 && nowTime.hour < 6 -> return timeDataOne.first().ty2
nowTime.hour >= 6 && nowTime.hour < 8 -> return timeDataOne.first().ty3
nowTime.hour >= 8 && nowTime.hour < 10 -> return timeDataOne.first().ty4
nowTime.hour >= 10 && nowTime.hour < 12 -> return timeDataOne.first().ty5
nowTime.hour >= 12 && nowTime.hour < 14 -> return timeDataOne.first().ty6
nowTime.hour >= 16 && nowTime.hour < 18 -> return timeDataOne.first().ty7
nowTime.hour >= 18 && nowTime.hour < 20 -> return timeDataOne.first().ty8
nowTime.hour >= 20 && nowTime.hour < 22 -> return timeDataOne.first().ty9
nowTime.hour >= 22 && nowTime.hour < 24 -> return timeDataOne.first().ty10
}

return result
Expand Down