Skip to content

Conversation

@jycor
Copy link
Contributor

@jycor jycor commented Apr 16, 2024

Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

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

Looks good!

return time.Date(int(years), time.Month(months), int(days), 0, 0, 0, 0, time.UTC), nil
}

// LastDay is a function that the date but at the last day of the month.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// LastDay is a function that the date but at the last day of the month.
// LastDay is a function that returns the date at the last day of the month.

arg: expression.NewLiteral("0001-11-00", types.Text),
exp: time.Date(1, 11, 30, 0, 0, 0, 0, time.UTC),
},
{
Copy link
Contributor

Choose a reason for hiding this comment

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

(minor) might be worth adding another date that has an incorrect day for the month, like 2020-02-30 or something.

@jycor jycor merged commit 509c423 into main Apr 16, 2024
@jycor jycor deleted the james/days branch April 16, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants