-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REFACTOR] #112 : Network 모듈 DateUtil 추가
- Loading branch information
Showing
5 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
core/network/src/main/java/com/wap/wapp/core/network/utils/DateUtil.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.wap.wapp.core.network.utils | ||
|
||
import java.time.LocalDateTime | ||
import java.time.ZoneId | ||
import java.time.format.DateTimeFormatter | ||
|
||
internal fun String.toISOLocalDateTime(): LocalDateTime = LocalDateTime.parse( | ||
this, | ||
DateTimeFormatter.ISO_LOCAL_DATE_TIME, | ||
) | ||
|
||
internal fun LocalDateTime.toISOLocalDateTimeString(): String = | ||
this.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) | ||
|
||
internal fun generateNowDateTime(zoneId: ZoneId = ZoneId.of("Asia/Seoul")): LocalDateTime = | ||
LocalDateTime.now(zoneId) |
9 changes: 0 additions & 9 deletions
9
core/network/src/main/java/com/wap/wapp/core/network/utils/LocalDateTime.kt
This file was deleted.
Oops, something went wrong.