Skip to content

Commit

Permalink
Show month from the week start
Browse files Browse the repository at this point in the history
Showing the month of todays date is confusing
  • Loading branch information
Zalastax committed Oct 23, 2016
1 parent ae3fa5d commit 576cc4f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/calendar-week/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ function analyzeIntervals(intervals: Interval[]) {
return height
}

const now = moment()
const weekStart = now.startOf("week")
const weekStart = moment().startOf("week")


interface HeightProps {
Expand Down Expand Up @@ -106,7 +105,7 @@ class CalendarWeek extends React.Component<CalendarWeekProps, void> {
return (
<div>
<header>
<h1>{now.format("MMMM YYYY")}</h1>
<h1>{weekStart.format("MMMM YYYY")}</h1>
</header>
<div className={CSS.calendar}>
<ul className={CSS.weekdays}>
Expand Down

0 comments on commit 576cc4f

Please sign in to comment.