<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>349044</bug_id>
          
          <creation_ts>2015-06-11 22:34:49 +0000</creation_ts>
          <short_desc>Week number is off-by-one in Plasma Calendar</short_desc>
          <delta_ts>2015-06-12 04:23:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>Calendar widget</component>
          <version>master</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sebastian Kügler">sebas</reporter>
          <assigned_to name="Martin Klapetek">mklapetek</assigned_to>
          <cc>plasma-bugs-null</cc>
          
          <cf_commitlink>http://commits.kde.org/plasma-framework/bc0280ddb0b1333aee1a8bc0322ba61327ef015a</cf_commitlink>
          <cf_versionfixedin>5.11</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1525529</commentid>
    <comment_count>0</comment_count>
    <who name="Sebastian Kügler">sebas</who>
    <bug_when>2015-06-11 22:34:49 +0000</bug_when>
    <thetext>The week number displayed is off by one on my system. We&apos;re currently in week 24, calendar displays week 23. (It&apos;s 11th June, and my locale is LC_ALL=en_US.UTF8.)

In a shell this display the right number (24):
date +%V

Python also gets it right:
&gt;&gt;&gt; import datetime
&gt;&gt;&gt; datetime.date.today().isocalendar()[1]
24


Reproducible: Always</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525530</commentid>
    <comment_count>1</comment_count>
    <who name="Martin Klapetek">mklapetek</who>
    <bug_when>2015-06-11 22:47:00 +0000</bug_when>
    <thetext>Ah, interesting. This is indeed the case for locales starting the week with Sunday.

Investigating.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525531</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Klapetek">mklapetek</who>
    <bug_when>2015-06-11 23:11:25 +0000</bug_when>
    <thetext>Git commit bc0280ddb0b1333aee1a8bc0322ba61327ef015a by Martin Klapetek.
Committed on 11/06/2015 at 23:11.
Pushed by mklapetek into branch &apos;master&apos;.

[calendar] Always start counting weeks from Monday

Sometimes the first day in the grid can be Sunday, but the week number
must always be counted from Monday in that week
Change-Id: I903650fcaadb4fd78764ad6a8bb1e219261c791b
FIXED-IN: 5.11

M  +13   -1    src/declarativeimports/calendar/calendar.cpp

http://commits.kde.org/plasma-framework/bc0280ddb0b1333aee1a8bc0322ba61327ef015a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525546</commentid>
    <comment_count>3</comment_count>
    <who name="Sebastian Kügler">sebas</who>
    <bug_when>2015-06-12 04:23:32 +0000</bug_when>
    <thetext>*confirms fixed*

Thanks Martin!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>