Skip to content

Commit

Permalink
add: diff year example on isSameMonth (#2801)
Browse files Browse the repository at this point in the history
  • Loading branch information
hg-pyun committed Nov 30, 2021
1 parent 4f33a51 commit c374b3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/isSameMonth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ import requiredArgs from '../_lib/requiredArgs/index'
* // Are 2 September 2014 and 25 September 2014 in the same month?
* var result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))
* //=> true
*
* @example
* // Are 2 September 2014 and 25 September 2015 in the same month?
* var result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))
* //=> false
*/
export default function isSameMonth(dirtyDateLeft: Date | number, dirtyDateRight: Date | number): boolean {
requiredArgs(2, arguments)
Expand Down

0 comments on commit c374b3c

Please sign in to comment.