Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

✨Add new dates helper functions #44

Merged
merged 2 commits into from
Nov 15, 2018
Merged

Conversation

rexmac
Copy link
Contributor

@rexmac rexmac commented Nov 13, 2018

Adds some new date helper functions to src/dates.ts:

  • isSameDate(source: Date, target: Date)
    • do the two dates share the same day, month, and year
  • isSameMonthAndYear(source: Date, target: Date)
    • do the two dates share the same month and year
  • isToday(date: Date)
    • is the provided date the same day, month, and year as today
  • isYesterday(date: Date)
    • is the provided date the same day, month, and year as the day before today

Copy link
Contributor

@nimzco nimzco left a comment

Choose a reason for hiding this comment

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

🎉 Awesome!

@@ -2,6 +2,8 @@

[//]: # '## [Unreleased]'

- [Dates] Added new helper functions: `isSameDate`, `isSameMonthAndYear`, `isToday`, and `isYesterday`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess that will be 2.3.0 🤔

@rexmac rexmac merged commit 8a62c20 into master Nov 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants