Opened 13 years ago

Last modified 12 years ago

#4057 new Feature Requests

Patch to allow posix_time::ptime to have boost::gregorian::days overloaded operators

Reported by: adam.preble@… Owned by: az_sw_dude
Milestone: Boost 1.43.0 Component: date_time
Version: Boost 1.42.0 Severity: Cosmetic
Keywords: ptime date_time days Cc:

Description

Within boost/date_time/posix_time/date_duration_operators.hpp, there are overloaded operators for months and years, but not days. I found out this was missing while trying to use ptime for some things. I wanted to contribute a patch.

The patch will allow operators +, -, +=, -= for gregorian days.

I am using gentoo's dev-libs/boost-1.42 at this time. My apologies if I'm out of date.

Please apply my patch directly to the file. Again, my apologies if I'm not complying with some format. I don't often contribute patches to projects.

Attachments (1)

date_duration_operators_acpreble_20100401.patch (1.9 KB ) - added by adam.preble@… 13 years ago.
Apply to posix_time/date_duration_operators.hpp

Download all attachments as: .zip

Change History (2)

by adam.preble@…, 13 years ago

Apply to posix_time/date_duration_operators.hpp

comment:1 by viboes, 12 years ago

Type: PatchesFeature Requests

You should provide some tests and documentation to complete the patch for the feature request. Otherwise we risk to add an untested and undocumented feature added to date_time.

Note: See TracTickets for help on using tickets.