This repository has been archived by the owner on May 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
119 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#This is a generated file so things tend to get overwritten. | ||
#Use `gradlew bumpVersion` to increment the version by 1 | ||
#or `gradlew bumpVersion -P_BUILD_NUMBER=<your specific version>` to set it manually | ||
#Thu Apr 18 17:32:13 IST 2019 | ||
BUILD_NUMBER=443 | ||
#Fri Apr 19 15:41:17 IST 2019 | ||
BUILD_NUMBER=444 |
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
43 changes: 43 additions & 0 deletions
43
lib/components/Verifications/__tests__/__snapshots__/ExpirationItem-test.js.snap
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,43 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`ExpirationItem renders ExpirationItem in milliseconds 1`] = ` | ||
<View> | ||
<Text | ||
accessible={true} | ||
allowFontScaling={true} | ||
ellipsizeMode="tail" | ||
style={ | ||
Object { | ||
"color": "rgba(74,74,74,1)", | ||
"fontFamily": undefined, | ||
"fontSize": 12, | ||
"lineHeight": 16, | ||
} | ||
} | ||
> | ||
Exp: | ||
Mar 1st 2020 | ||
</Text> | ||
</View> | ||
`; | ||
|
||
exports[`ExpirationItem renders ExpirationItem in seconds 1`] = ` | ||
<View> | ||
<Text | ||
accessible={true} | ||
allowFontScaling={true} | ||
ellipsizeMode="tail" | ||
style={ | ||
Object { | ||
"color": "rgba(74,74,74,1)", | ||
"fontFamily": undefined, | ||
"fontSize": 12, | ||
"lineHeight": 16, | ||
} | ||
} | ||
> | ||
Exp: | ||
Mar 1st 2020 | ||
</Text> | ||
</View> | ||
`; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import moment from 'moment' | ||
/** | ||
* Formats a timestamp into a readable date format regardless of seconds or milliseconds | ||
* | ||
*/ | ||
const dateChecker = (date: number) => { | ||
const isMilliSeconds = date && date >= 1000000000000 | ||
const formattedDate = isMilliSeconds ? moment(date).format('MMM Do YYYY') : moment.unix(date).format('MMM Do YYYY') | ||
return formattedDate | ||
} | ||
|
||
export default dateChecker |