From 576cc4fc84b94757f5ae057d24caaf710326b3cf Mon Sep 17 00:00:00 2001 From: Pierre Krafft Date: Sun, 23 Oct 2016 21:42:59 +0200 Subject: [PATCH] Show month from the week start Showing the month of todays date is confusing --- src/components/calendar-week/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/calendar-week/index.tsx b/src/components/calendar-week/index.tsx index 7b51f5e..12df033 100644 --- a/src/components/calendar-week/index.tsx +++ b/src/components/calendar-week/index.tsx @@ -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 { @@ -106,7 +105,7 @@ class CalendarWeek extends React.Component { return (
-

{now.format("MMMM YYYY")}

+

{weekStart.format("MMMM YYYY")}