Modify

Ticket #4845 (closed Patches: fixed)

Opened 3 years ago

Last modified 3 years ago

end_of_month_day

Reported by: robbie@… Owned by: az_sw_dude
Milestone: To Be Determined Component: date_time
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

the last entry in section: http://www.boost.org/doc/libs/1_44_0/doc/html/date_time/gregorian.html#date_accessors

is incorrect:

date end_of_month_day() const

it should read:

date end_of_month() const

supporting trials:

// call     : $ g++ -ggdb -Wall -pedantic -Weffc++ test.cc -o test
// compiler : g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
// library  : Boost 1.44.0

#include <iostream>                                 // standard io
#include <boost/date_time/gregorian/gregorian.hpp>  // may require -lboost_date_time

int
main()
{
  namespace bg = boost::gregorian;             // namespace aliases
  const bg::date feb(2000, bg::Feb, 1);
  const bg::date eom = feb.end_of_month();     // [1]
//const bg::date eom = feb.end_of_month_day(); // [2]
  const int      dom = eom.day();              // recover day-of-month
  std::cout << "day-of-month : " << dom << std::endl;
}

// [1] works as expected
// [2] test.cc:21: error: 'const class boost::gregorian::date'
//       has no member named 'end_of_month_day

Attachments

date_class.diff Download (726 bytes) - added by ktchan 3 years ago.
Patch to date_class.diff
date_class.2.diff Download (726 bytes) - added by ktchan 3 years ago.
Patch to date_class.xml

Change History

comment:1 Changed 3 years ago by danieljames

  • Owner changed from matias to az_sw_dude
  • Component changed from Documentation to date_time

comment:2 Changed 3 years ago by viboes

This seems fixed in trunk, isn't it?

comment:3 Changed 3 years ago by robbie@…

I am the original poster. I just checked the following:  http://svn.boost.org/svn/boost/trunk/libs/date_time/xmldoc/date_class.xml

And it is still incorrect. Is this what you mean by "fixed in trunk"?

Changed 3 years ago by ktchan

Patch to date_class.diff

Changed 3 years ago by ktchan

Patch to date_class.xml

comment:4 Changed 3 years ago by ktchan

  • Version changed from Boost 1.44.0 to Boost Development Trunk
  • Type changed from Bugs to Patches

Um, those are the same diff.

comment:5 Changed 3 years ago by robbie@…

I am the original poster. Looks fixed as far as I can tell. Probably best to mark this one as resolved and I will try to remember to double check the next release. Thanks people.

comment:6 Changed 3 years ago by ktchan

It's not, look at line 339 & line 345 of  http://svn.boost.org/svn/boost/trunk/libs/date_time/xmldoc/date_class.xml. Someone with write access to trunk need to commit the changes.

comment:7 Changed 3 years ago by robbie@…

Original poster here. Regarding comment:6, ktchan is currently correct. (Not sure how I got it wrong in comment:5.)

comment:8 Changed 3 years ago by robbie@…

Original poster again.  http://svn.boost.org/svn/boost/trunk/libs/date_time/xmldoc/date_class.xml is now correct. Does somebody want to change the status of this issue to resolved? I'll try and remember to check the next release. Thanks to all.

comment:9 Changed 3 years ago by ktchan

Erm, no ones made any changes to date_time on trunk for a few months. comment:6 still applies...

comment:10 Changed 3 years ago by robbie@…

As far as I can tell, http://www.boost.org/doc/libs/1_45_0/doc/html/date_time/gregorian.html remains incorrect. But that  http://svn.boost.org/svn/boost/trunk/libs/date_time/xmldoc/date_class.xml is fixed. Why not close this issue then? I promise to check the next release and open a new report if the incorrect function name, end_of_month_day, resurfaces then.

comment:11 Changed 3 years ago by ktchan

Because there's been no changes made to that file since long before 1.45 was released. If as you say, it's incorrect in 1.45, then it's still incorrect.

As I pointed out in comment:6, line 339 & line 345 of that file still have end_of_month_day, so it is not fixed.

comment:12 Changed 3 years ago by robbie@…

I would like to retract my last comment:10. I just rechecked. The svn copy is still incorrect. Sorry for the confusion (and thanks to ktchan for their patience).

comment:13 Changed 3 years ago by robbie@…

Original reporter here -- the next release 1.46.0 (http://www.boost.org/doc/libs/1_46_0/doc/html/date_time/gregorian.html#date_time.gregorian.date_class) is out and this typo is still not fixed.

comment:14 Changed 3 years ago by marshall

(In [70766]) Applied patches - Refs #3651 Refs #4845

comment:15 Changed 3 years ago by marshall

  • Status changed from new to closed
  • Resolution set to fixed

(In [70981]) Merge to release. Fixes #3651 Fixes #4845

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.