Skip to content

Conversation

@sandrvvu
Copy link
Collaborator

  • Added getEndOfDay helper.
  • Adjusted date format (omitting time) on frontend and backend.

First render earlier:
image
Now:
image

import { startOfDay } from "date-fns";

const getStartOfDay = (date: Date): Date => {
const getStartOfDay = (date: Date | string): Date => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should limit options in our custom helpers and use only one common format for payload, so we either need to pass date or string here. In this case it's better to pass date, not to care about date parsing in this helper. The same for getEndOfDay helper

Suggested change
const getStartOfDay = (date: Date | string): Date => {
const getStartOfDay = (date: Date): Date => {

@sandrvvu sandrvvu requested a review from liza-veis September 24, 2024 22:47
@liza-veis liza-veis merged commit 9882708 into main Sep 25, 2024
This was referenced Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants