forked from binary-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WALL-2712/chore: make get_settings api call for idv and poa screen (b…
…inary-com#11660) * chore: make get_settings api call for idv and poa screen * chore: komen
- Loading branch information
1 parent
4be4ccb
commit baab0db
Showing
4 changed files
with
40 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default function unixToDateString(unixTimestamp: number): string { | ||
const date = new Date(unixTimestamp * 1000); | ||
|
||
//ensure that the day and month always have two digits. | ||
const day = String(date.getDate()).padStart(2, '0'); | ||
const month = String(date.getMonth() + 1).padStart(2, '0'); | ||
const year = date.getFullYear(); | ||
|
||
return `${year}-${month}-${day}`; | ||
} |
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