← Back to team overview

desktop-packages team mailing list archive

[Bug 127505] Re: [Upstream] [hardy] YEARFRAC function returns incorrect results for some dates

 

Launchpad has imported 4 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=40100.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2011-08-15T10:25:01+00:00 Christopher M. Penalver wrote:

Downstream bug may be found at:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/127505

OOo bug may be found at:
http://qa.openoffice.org/issues/show_bug.cgi?id=74069

1) lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

2) apt-cache policy libreoffice-calc
libreoffice-calc:
  Installed: 1:3.3.3-1ubuntu2
  Candidate: 1:3.3.3-1ubuntu2
  Version table:
 *** 1:3.3.3-1ubuntu2 0
        100 /var/lib/dpkg/status
     1:3.3.2-1ubuntu5 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main i386 Packages
     1:3.3.2-1ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages

3) What is expected to happen is when one types in a cell either:

=YEARFRAC(DATE(1958,3,1),DATE(1996,1,1),1)
=YEARFRAC(DATE(1958,3,1),DATE(1995,12,31),1)

one gets two different results.

4) What happens instead is they are identical:

37.8356164384
37.8356164384

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/127505/comments/4

------------------------------------------------------------------------
On 2011-08-16T14:47:20+00:00 Jeffdchang wrote:

Confirmed for LibreOffice 3.4  340m1(Build:103) on OpenSuse Linux.

Tried it with =YEARFRAC(DATE(1958,3,1),DATE(1994,12,31),1) and
=YEARFRAC(DATE(1958,3,1),DATE(1995,1,1),1), which give different
results, so it is not because the difference of 1 day is so small the
decimal is unchanged. Also tried with
=YEARFRAC(DATE(1958,1,1),DATE(1997,12,31),1), and it gives a non-zero
value, so Calc recognizes the difference of a day between 12/31 and 1/1.

Do not know why bug appears for those two values.

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/127505/comments/5

------------------------------------------------------------------------
On 2011-08-19T06:11:13+00:00 Markus-mohrhard wrote:

mark as enhancement
http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_YEARFRAC_function mentions: Excel and Calc both produce slightly erroneous results in some circumstances.

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/127505/comments/6

------------------------------------------------------------------------
On 2011-12-23T20:35:40+00:00 Björn Michaelsen wrote:

[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org
/RFC-Operation-Spamzilla-tp3607474p3607474.html

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/127505/comments/8


** Changed in: df-libreoffice
       Status: Confirmed => Incomplete

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libreoffice in Ubuntu.
https://bugs.launchpad.net/bugs/127505

Title:
  [Upstream] [hardy] YEARFRAC function returns incorrect results for
  some dates

Status in LibreOffice Productivity Suite:
  Incomplete
Status in The OpenOffice.org Suite:
  In Progress
Status in “libreoffice” package in Ubuntu:
  Triaged
Status in “openoffice.org” package in Ubuntu:
  Won't Fix

Bug description:
  Binary package hint: openoffice.org

  1) lsb_release -rd
  Description:	Ubuntu 11.04
  Release:	11.04

  2) apt-cache policy libreoffice-calc
  libreoffice-calc:
    Installed: 1:3.3.3-1ubuntu2
    Candidate: 1:3.3.3-1ubuntu2
    Version table:
   *** 1:3.3.3-1ubuntu2 0
          100 /var/lib/dpkg/status
       1:3.3.2-1ubuntu5 0
          500 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main i386 Packages
       1:3.3.2-1ubuntu4 0
          500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages

  3) What is expected to happen is when one types in a cell either:

  =YEARFRAC(DATE(1958,3,1),DATE(1996,1,1),1)
  =YEARFRAC(DATE(1958,3,1),DATE(1995,12,31),1)

  one gets two different results.

  4) What happens instead is they are identical:

  37.8356164384
  37.8356164384

  WORKAROUND: Use Gnumeric as the results are:

  37.8364338364338
  37.8357230348008

  apt-cache policy gnumeric
  gnumeric:
    Installed: 1.10.13-1ubuntu1
    Candidate: 1.10.13-1ubuntu1
    Version table:
   *** 1.10.13-1ubuntu1 0
          500 http://us.archive.ubuntu.com/ubuntu/ natty/universe i386 Packages
          100 /var/lib/dpkg/status

  Original Reporter Comments: This occurs whenever the "End date" is in
  a leap year (New Year's Eve/Day is convenient) and the "Start date" is
  not in a leap year but is later than 28-Feb of its year. For example,
  "Start dates" between "1.1.1958" and "2.28.1958" in the above examples
  work correctly.

To manage notifications about this bug go to:
https://bugs.launchpad.net/df-libreoffice/+bug/127505/+subscriptions