Bug 257228

Summary: week-of-year formatting is not implemented
Product: [Applications] calligrasheets Reporter: Jos van den Oever <jos>
Component: opendocumentAssignee: Calligra Sheets (KSpread) Bugs <calligra-sheets-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: jimnclark, sebsauer
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: ODS document showing the problem

Description Jos van den Oever 2010-11-18 11:13:48 UTC
Version:           svn (using KDE 4.5.3) 
OS:                Linux

number:week-of-year formatting is not implemented
This type of formatting shows the number of the week for a given date.
Instead kspread currently shows 2010-01-01 type date, i.e. no formatting.

Reproducible: Didn't try

Steps to Reproduce:
Create document in other ODF spreadsheet application or make it by hand.
Use this for formatting style:
   <number:date-style style:name="N85">
      <number:week-of-year/>
    </number:date-style>
Comment 1 Myriam Schweingruber 2011-12-03 09:22:46 UTC
*** Bug 287812 has been marked as a duplicate of this bug. ***
Comment 2 Sebastian Sauer 2011-12-09 03:55:46 UTC
Created attachment 66526 [details]
ODS document showing the problem

Attached document shows the problem. OO.org displays "41" in A1 while we display the full date.
Comment 3 Sebastian Sauer 2011-12-09 04:05:53 UTC
See calligra/libs/odf/KoOdfNumberStyles.cpp:112

} else if (localName == "week-of-year" || localName == "quarter") {
    // ### not supported in Qt
}

So, the reason is that QDate/QDateTime to not support week-of-year in there toString formatting. But QDate::weekNumber does exist. So, the functionality is there but not supported in format-strings :-/
Comment 4 Justin Zobel 2021-03-09 22:43:47 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.