chore: date and time standardization all across the platform. (#3283)
* chore: date and time standardization all across the platform. * chore: update `renderFormattedTime` function. * remove unwanted code. * fix: build errors * chore: update `renderFormattedTime` function params.
This commit is contained in:
parent
d9ee692ce9
commit
1539340113
65 changed files with 366 additions and 723 deletions
|
|
@ -20,7 +20,7 @@ import { Spinner } from "@plane/ui";
|
|||
// assets
|
||||
import emptyPage from "public/empty-state/page.svg";
|
||||
// helpers
|
||||
import { renderDateFormat } from "helpers/date-time.helper";
|
||||
import { renderFormattedPayloadDate } from "helpers/date-time.helper";
|
||||
// types
|
||||
import { NextPageWithLayout } from "types/app";
|
||||
import { IPage, IIssue } from "types";
|
||||
|
|
@ -279,7 +279,7 @@ const PageDetailsPage: NextPageWithLayout = observer(() => {
|
|||
mutatePageDetailsHelper(
|
||||
pageService.archivePage(workspaceSlug.toString(), projectId.toString(), pageId.toString()),
|
||||
{
|
||||
archived_at: renderDateFormat(new Date()),
|
||||
archived_at: renderFormattedPayloadDate(new Date()),
|
||||
},
|
||||
["description_html"],
|
||||
() =>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import { ExternalLinkIcon, Loader } from "@plane/ui";
|
|||
// fetch-keys
|
||||
import { USER_ACTIVITY } from "constants/fetch-keys";
|
||||
// helper
|
||||
import { timeAgo } from "helpers/date-time.helper";
|
||||
import { calculateTimeAgo } from "helpers/date-time.helper";
|
||||
// type
|
||||
import { NextPageWithLayout } from "types/app";
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ const ProfileActivityPage: NextPageWithLayout = () => {
|
|||
: activityItem.actor_detail.display_name}
|
||||
</div>
|
||||
<p className="mt-0.5 text-xs text-custom-text-200">
|
||||
Commented {timeAgo(activityItem.created_at)}
|
||||
Commented {calculateTimeAgo(activityItem.created_at)}
|
||||
</p>
|
||||
</div>
|
||||
<div className="issue-comments-section p-0">
|
||||
|
|
@ -165,7 +165,7 @@ const ProfileActivityPage: NextPageWithLayout = () => {
|
|||
<div className="flex gap-1 truncate">
|
||||
{message}{" "}
|
||||
<span className="flex-shrink-0 whitespace-nowrap">
|
||||
{timeAgo(activityItem.created_at)}
|
||||
{calculateTimeAgo(activityItem.created_at)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue