-
Notifications
You must be signed in to change notification settings - Fork 8
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/13 month calendar week number #53
Feat/13 month calendar week number #53
Conversation
… week number if set true from configuration
…-calendar into feat/13-month-calendar-week-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.
Looks good. Just added a few comments
result = 1; | ||
} | ||
} | ||
|
||
if (ycConfig.periodWeekNumber) { | ||
date.setHours(12, 0, 0, 0); | ||
const diff = (date.getTime() - firstWeekFirstDate.getTime()) / 86400000; |
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.
Can we move this constant into a const
variable to show that this number means?
projects/angular-year-calendar/src/lib/pipes/week-number/week-number.pipe.ts
Outdated
Show resolved
Hide resolved
projects/angular-year-calendar/src/lib/pipes/week-number/week-number.pipe.ts
Outdated
Show resolved
Hide resolved
transform(date: Date, ycConfig: YCConfig, year): any { | ||
const dateClone = new Date(date); | ||
const {firstWeekMonth, weekStartsOn, forceWeek, forceWeekDate} = ycConfig; | ||
const oneDay = 86400000; // milliseconds in a day |
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.
Can we rename this? We shouldn't need a comment to explain a variable name. The variable name should be self explanatory.
const oneDay = 86400000; // milliseconds in a day | |
const millisecondsInADay = 86400000; |
projects/demo/src/app/app.module.ts
Outdated
import { ExampleSectionComponent } from "./components/example-section/example-section.component"; | ||
import { ConfigSideBarComponent } from "./components/config-side-bar/config-side-bar.component"; | ||
import { YearCalendarModule } from "@iomechs/angular-year-calendar"; | ||
// import { YearCalendarModule } from "../../../angular-year-calendar/src/public-api"; |
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.
We can remove this import since we're not using it.
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.
LGTM
No description provided.