Skip to content
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

Merged

Conversation

tahamohsini
Copy link

No description provided.

Copy link
Contributor

@AhsanAyaz AhsanAyaz 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. Just added a few comments

result = 1;
}
}

if (ycConfig.periodWeekNumber) {
date.setHours(12, 0, 0, 0);
const diff = (date.getTime() - firstWeekFirstDate.getTime()) / 86400000;
Copy link
Contributor

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/demo/src/app/app.module.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
Copy link
Contributor

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.

Suggested change
const oneDay = 86400000; // milliseconds in a day
const millisecondsInADay = 86400000;

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";
Copy link
Contributor

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.

Copy link
Contributor

@AhsanAyaz AhsanAyaz left a comment

Choose a reason for hiding this comment

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

LGTM

@AhsanAyaz AhsanAyaz merged commit 262d85f into IOMechs:master Mar 26, 2024
1 check passed
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.

None yet

2 participants