-
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.
Merge pull request #116 from aodn/feature/5743-improve-searchbar
Feature/5743 improve searchbar
- Loading branch information
Showing
16 changed files
with
208 additions
and
99 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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// This file is only for date time related helper methods e.g comparing dates, convert timezone, etc. | ||
|
||
/** | ||
* Converts a date string from ISO 8601 format to a more readable format. | ||
* | ||
* @param dateString A date string in ISO 8601 format (e.g., "2021-08-01T00:00:00.000Z") | ||
* @returns A string representing the date in a more readable format (e.g., "Sun Aug 01 2021 05:30:00 GMT+0530") | ||
* | ||
* @example | ||
* const isoDate = "2021-08-01T00:00:00.000Z"; | ||
* const result = convertDateFormat(isoDate); | ||
* // result: "Sun Aug 01 2021 05:30:00 GMT+0530" (actual result may vary based on local timezone) | ||
* | ||
* @note The exact output format may vary depending on the local timezone of the system running the code. | ||
* @note This function assumes the input is a valid ISO 8601 date string. Invalid inputs may produce unexpected results. | ||
*/ | ||
export const convertDateFormat = (dateString: string): string => { | ||
const date = new Date(dateString); | ||
const convertedString = date.toString(); | ||
const index = convertedString.indexOf("("); | ||
return convertedString.substring(0, index).trim(); | ||
}; |
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.