-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: new methods setDate
/ getDate
#625
feat: new methods setDate
/ getDate
#625
Conversation
Please make sure that CI passes |
Codecov Report
@@ Coverage Diff @@
## master #625 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 16 16
Lines 1498 1536 +38
Branches 195 195
=========================================
+ Hits 1498 1536 +38
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I feel like Codecov is 1 commit behind |
getDate(value: TDate): number; | ||
setDate(value: TDate, count: number): TDate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about making it getDay
. I think it is more clear in terms of Date is the term for javascript date and may be confusing that it returns a number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes getDayInMonths or simply getDay
would be fine. Everything else is great, so once you will done the rename – we can merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I based my naming on the javascript Date
interface
new Date().getDay()
=> the day in the week
new Date().getDate()
=> the day in the month
But I don't have a strong opinion here
Libraries are not even coherent between them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setDate
/ getDate
setDate
/ getDate
Alternative names:
getDayInMonth
/setDayInMonth
(can be confusing withgetDaysInMonth
)