-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from moove-it/enhacement/date-unique-value
Add unique value to DateProvider
- Loading branch information
Showing
38 changed files
with
78 additions
and
76 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
9 changes: 5 additions & 4 deletions
9
library/src/main/java/com/mooveit/library/providers/DateTimeProviderImpl.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 |
---|---|---|
@@ -1,23 +1,24 @@ | ||
package com.mooveit.library.providers | ||
|
||
import com.mooveit.library.Fakeit | ||
import com.mooveit.library.providers.base.BaseProvider | ||
import com.mooveit.library.providers.definition.DateTimeProvider | ||
import java.text.SimpleDateFormat | ||
import java.util.* | ||
|
||
class DateTimeProviderImpl : DateTimeProvider { | ||
class DateTimeProviderImpl : BaseProvider(), DateTimeProvider { | ||
|
||
val date = Date() | ||
|
||
override fun dateFormatter(): String { | ||
return SimpleDateFormat(Fakeit.fakeit!!.fetch("date.formats")).format(date) | ||
return SimpleDateFormat(getValue("name", { Fakeit.fakeit!!.fetch("date.formats") }), Locale.ENGLISH).format(date) | ||
} | ||
|
||
override fun timeFormatter(): String { | ||
return SimpleDateFormat(Fakeit.fakeit!!.fetch("time.formats")).format(date) | ||
return SimpleDateFormat(getValue("name", { Fakeit.fakeit!!.fetch("time.formats") }), Locale.ENGLISH).format(date) | ||
} | ||
|
||
override fun dateTimeFormatter(): String { | ||
return SimpleDateFormat(Fakeit.fakeit!!.fetch("date.format_with_time")).format(date) | ||
return SimpleDateFormat(getValue("name", { Fakeit.fakeit!!.fetch("date.format_with_time") }), Locale.ENGLISH).format(date) | ||
} | ||
} |
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
Oops, something went wrong.