1229 Commits

Author SHA1 Message Date
Andrey Semashev
e9a9ce3e35 Change greg_month and greg_weekday to be not marked as exported/imported (#146)
* Changed greg_month and greg_weekday to be not marked as exported/imported.

Both greg_month and greg_weekday classes are implemented completely in headers,
so they need not be marked with BOOST_DATE_TIME_DECL. For consistency with other
similar classes, they are now marked with BOOST_SYMBOL_VISIBLE.

This should fix linking errors on Windows/MSVC, where all members of greg_month
and greg_weekday classes remain unresolved as they are expected to be
implemented in a shared library.

* Enabled shared and static linking in AppVeyor CI.
2020-04-06 08:55:36 -07:00
JeffGarland
0c1d8fddd8 fix merge conflicts to master from develop for boost 1.73 2020-04-05 15:27:12 -07:00
Jeff Garland
ad3239b722 date_time documentation updates for release 1.73 (#128)
* change gettimeofday to be clearer - issue #127

* clarify date_number docs - github issue #125

* add docs for from_iso_extended_string function - issue #116

* update documentation for 1.73 release - changes.xml
2020-04-05 14:14:40 -07:00
Andrey Semashev
d335a54e9f Add missing includes and fix special_value_from_string definition (#144)
* Added a test generator for whether all public headers are self-contained.

The generator creates a compile test for every public header, unless
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS environment variable
is set to 1.

* Only enable self-contained header tests on a few jobs.

There is no point in performing self-contained header tests on every compiler
configuration, so running them only on some saves CI time.

* Make public headers self-contained.

This commit:

- Adds missing includes.
- Adjusts gregorian namespace qualification in a few places to use use
  equivalent symbols from date_time and not have to include gregorian
  headers.
- Converts tabs to spaces and trims trailing spaces.

This makes the self-contained header tests pass on Linux.

* Move special_value_from_string definition to parsers.hpp.

This resolves different attributes applied to the function definition
in parsers.hpp and greg_month.hpp. The function is now inline and defined
in parsers.hpp.

Also, the commit converts tabs to spaces and trims trailing spaces.

Fixes https://github.com/boostorg/date_time/issues/143.

* Convert tabs to spaces and trim trailing spaces.
2020-04-05 07:27:27 -07:00
Jeff Garland
cb3bd50b90 make date-time all inline, additional constexpr fixes, clang 2a fix for boost 1.73 (#142)
* pull request to make date-time all inline (#135)

* remove legacy to_simple_string and prefer streaming in test code

* driveby fix to clean up self-assign compiler warnings in test code

* driveby fix to clean up unused variable compiler warnings in test code

* another update for issue #123 (constexpr) to allow time_duration constexpr to work

* final updates to make date_time free of library - issue #134

* add stub library for backward compatibility (#137)

* remove legacy to_simple_string and prefer streaming in test code

* driveby fix to clean up self-assign compiler warnings in test code

* driveby fix to clean up unused variable compiler warnings in test code

* another update for issue #123 (constexpr) to allow time_duration constexpr to work

* final updates to make date_time free of library - issue #134

* make a stub library for backward compatibility of libs that link date_time library

* suppressed const qualifier on function return type (#138)

* suppressed const qualifier on function return type

As warned in https://www.boost.org/development/tests/develop/output/teeks99-dkr-dg4-6-warn-date_time-gcc-4-6~c++0x~warn-warnings.html#hours_special_value
```../boost/date_time/gregorian/greg_weekday.hpp:52:41: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
../boost/date_time/gregorian/greg_weekday.hpp:61:40: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]```

* trivial commit to trigger CI

* fix c++2a ambiguity on clang10 with operator== issue #132 (#140)

Co-authored-by: joaquintides <joaquin.lopezmunoz@gmail.com>
boost-1.73.0.beta1
2020-03-25 05:38:03 -07:00
Jeff Garland
4a46476358 fix c++2a ambiguity on clang10 with operator== issue #132 (#140) 2020-03-22 20:05:09 -07:00
joaquintides
44618f1632 suppressed const qualifier on function return type (#138)
* suppressed const qualifier on function return type

As warned in https://www.boost.org/development/tests/develop/output/teeks99-dkr-dg4-6-warn-date_time-gcc-4-6~c++0x~warn-warnings.html#hours_special_value
```../boost/date_time/gregorian/greg_weekday.hpp:52:41: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
../boost/date_time/gregorian/greg_weekday.hpp:61:40: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]```

* trivial commit to trigger CI
2020-03-19 08:16:47 -07:00
Jeff Garland
bbac2178ed add stub library for backward compatibility (#137)
* remove legacy to_simple_string and prefer streaming in test code

* driveby fix to clean up self-assign compiler warnings in test code

* driveby fix to clean up unused variable compiler warnings in test code

* another update for issue #123 (constexpr) to allow time_duration constexpr to work

* final updates to make date_time free of library - issue #134

* make a stub library for backward compatibility of libs that link date_time library
2020-03-15 21:03:59 -07:00
Jeff Garland
d8c7a59ed9 pull request to make date-time all inline (#135)
* remove legacy to_simple_string and prefer streaming in test code

* driveby fix to clean up self-assign compiler warnings in test code

* driveby fix to clean up unused variable compiler warnings in test code

* another update for issue #123 (constexpr) to allow time_duration constexpr to work

* final updates to make date_time free of library - issue #134
2020-03-15 04:27:39 -07:00
JeffGarland
d8a894c44a fix merge conflicts 2020-03-14 10:28:43 -07:00
Jeff Garland
139f44776d date time misc cleanup (#131)
* remove superflous HAS_MICROSECOND and HAS_MILLISECOND macros

* remove pre 1_33 facet detection for dead compilers
2020-03-12 18:36:13 -07:00
Jeff Garland
6f7b2b5056 fix report of warnings for constexpr updates on gcc9 03 mode (#130) 2020-03-10 16:24:10 -07:00
Jeff Garland
4e1b7cde45 initial set of core changes for constexpr support (issue #123) (#126)
* initial set of core changes for constexpr support (issue #123)

* fixes for constexpr core support based on ci failures (issue #123)

* drive by fix for gcc9.2 warning on polymorphic exception

* fixes for constexpr core support based on for cpp11 and cpp14 build variants (issue #123)

* more fixes for constexpr core support  (issue #123) - also fix for issue #124

* next round of changes for constexpr core support (issue #123)

* fix last msvc regression for constexpr core

* driveby fix to remove detail include

* 3rd round of changes for constexpr

* yet another msvc fix for cpp14

* minor doc fix for issue #127 - tm_isddst -> tm_isdst

* minor doc fix for issue #127 - tm_isddst -> tm_isdst

* push constexpr deep into the library including date, ptime (issue #123)

* push constexpr deep into the library including date, ptime (issue #123)

* fix latests regressions from constexpr changes in older gcc
2020-03-05 06:46:35 -07:00
Jeff Garland
e26fd2ed98 pull develop to master for boost 1.72 (#117)
* Synchronize each miscrosec test to the next second (#109)

* Synchronize each miscrosec test to the next second

The aim is to avoid false positives in test_microsec when the seconds,
minutes or hours change during time read between the second_clock and
the microsec_clock.

* Improved readability of the microcec_time_clock test

* Improve performance of adding and subtracting time durations from a ptime. (#99)

Modifying ptime objects by adding and subtracting time durations was
inefficient because it extracted the date and time of day and then
re-constructed a ptime using the date and modified time of day.

This can be avoided by using the existing time_system utilities which
perform the operation by adjusting the number of ticks.

Performance is improved by a factor of 48 on my system.

* Update CI Scripts

* Add time_duration helper functions: (#113)

1. is_positive()
  - Return boolean value to indicate whether or not time duration is
    positive.
2. is_zero()
  - Return boolean value to indicate whether or not time duration is
    zero.
3. abs()
  - Return a time_duration which is the absolute value of time
    duration.

Added documentation for these helper functions and improved existing
documentation to indicate constness, return values or static
functions.

* Cease dependence on MPL (#115)
boost-1.72.0
2019-12-03 17:06:28 -07:00
Nikita Kniazev
061aec856d Cease dependence on MPL (#115) 2019-11-21 07:28:47 -07:00
Gawain Bolton
1a95e81043 Add time_duration helper functions: (#113)
1. is_positive()
  - Return boolean value to indicate whether or not time duration is
    positive.
2. is_zero()
  - Return boolean value to indicate whether or not time duration is
    zero.
3. abs()
  - Return a time_duration which is the absolute value of time
    duration.

Added documentation for these helper functions and improved existing
documentation to indicate constness, return values or static
functions.
2019-11-01 04:08:45 -07:00
James E. King III
c0b71da135 Update CI Scripts 2019-10-14 16:42:18 -04:00
Gawain Bolton
2fabfad443 Improve performance of adding and subtracting time durations from a ptime. (#99)
Modifying ptime objects by adding and subtracting time durations was
inefficient because it extracted the date and time of day and then
re-constructed a ptime using the date and modified time of day.

This can be avoided by using the existing time_system utilities which
perform the operation by adjusting the number of ticks.

Performance is improved by a factor of 48 on my system.
2019-10-10 13:07:48 -07:00
cclienti
3cc68a4642 Synchronize each miscrosec test to the next second (#109)
* Synchronize each miscrosec test to the next second

The aim is to avoid false positives in test_microsec when the seconds,
minutes or hours change during time read between the second_clock and
the microsec_clock.

* Improved readability of the microcec_time_clock test
2019-10-08 07:17:01 -07:00
LE GARREC Vincent
29bb209464 Fix unsigned / signed conversion
gregorian_calendar::end_of_month_day returns unsigned short and date constructor uses unsigned short too.
boost-1.72.0.beta1 boost-1.71.0.beta1 boost-1.71.0
2019-05-10 10:32:15 -04:00
Mana Borwornpadungkitti
345abc6b67 Fix a typo in example of time_duration xmldoc (#100) 2019-03-24 08:32:07 -07:00
ehrlin
b0437e2999 Renamed parameter dst_length_minutes to dst_length. (#96) boost-1.70.0.beta1 boost-1.70.0 2019-03-04 11:29:48 -05:00
Marcel Raad
5902a0e577 Fix doxygen clang warnings (#97)
* doxygen: use @tparam for template parameters (clang warns about using @param).
2019-02-25 15:27:45 -05:00
James E. King III
c18805c4ba update cygwin on CI before building (#93) 2018-12-02 20:36:03 -07:00
James E. King III
81d60863b6 Enhance CI for more build coverage boost-1.69.0-beta1 boost-1.69.0 2018-11-02 21:27:05 -04:00
James E. King III
a3d61f0d30 Enhance Travis CI build coverage 2018-10-28 11:37:32 -04:00
Sylvain Joubert
dc5ce19c27 Use nullptr instead of 0 if possible
This is to prevent gcc's -Wzero-as-nullptr-constant warnings
2018-09-06 07:22:34 -04:00
James E. King III
66ee8bf48f fix failing ci jobs in travis boost-1.68.0 2018-07-14 17:37:59 +00:00
James E. King III
aa19739c55 move ci to boost-ci model 2018-06-17 07:23:14 -04:00
James E. King III
f76ef169a0 make valgrind return error code on failure 2018-05-15 21:16:08 -04:00
James E. King, III
fd5f9aea7c Work around a gcc-7.3 issue running ubsan on travis CI
https://stackoverflow.com/questions/50024731/ld-unrecognized-option-push-state-no-as-needed
2018-04-29 10:07:42 -04:00
James E. King, III
6875e73a03 Add license file 2018-04-29 10:06:38 -04:00
James E. King III
8e1f2be360 improve code coverage results processing boost-1.67.0 2018-03-07 15:17:47 -05:00
Andrey Semashev
1838518b41 Silence MSVC warnings about conditional expression being constant.
The warning is emitted whereever std::numeric_limits<>::is_signed is used
in a conditional statement.
2018-02-10 23:42:44 -05:00
James E. King III
a7ec0146c7 Update README 2018-01-28 10:09:21 -05:00
James E. King III
9690a13c55 Update README 2018-01-28 10:08:41 -05:00
James E. King III
5a70608c65 add jking to maintainers list 2018-01-28 10:05:15 -05:00
James E. King III
dae0fa1b47 quiet unused variable warnings in compile_fail tests 2018-01-28 10:04:59 -05:00
James E. King III
3f092da750 trac-13159, trac-12630: fix maximum year to 9999 2018-01-24 09:44:04 -05:00
James E. King III
960c959f10 update readme and link to boostdep 2018-01-23 18:19:38 -05:00
James E. King III
1a2700d527 fix issues identified by Coverity Scan 2018-01-23 17:57:36 -05:00
James E. King III
8b92513a94 trac-1078: given to_iso_string can print special values, make from_iso_string read them 2018-01-22 15:49:25 -05:00
James E. King III
d8a1ed32fb add codecov.io, cppcheck, ubsan, and coverity scan support; refactor travis to use jobs 2018-01-21 20:14:06 -05:00
James E. King, III
313c1a38f8 Merge pull request #62 from jeking3/trac-3606
trac-3606: fix remaining msvc /W4 complaints (msvc-10.0 and up)
2018-01-17 22:10:35 -05:00
James E. King III
e0da18162a trac-9882: fix gcc -Wshadow errors and warnings enabled by trac-3606 2018-01-17 09:22:22 -05:00
James E. King III
f35bbbe906 trac-3606: fix remaining msvc /W4 complaints (msvc-10.0 and up) 2018-01-17 09:22:22 -05:00
James E. King III
f280794280 fix mingw related build issues on appveyor 2018-01-16 14:27:16 -05:00
James E. King III
18b6ca8160 trac-11142: fix boost::date_time::period_parser::delimiter_strings and add a unit test for it
also added project declarations to jamfiles, added a top level jamfile, and fixed the xmldoc jamfile
also fixed a silent failure y2038 issue in localtime handling and fixed a timezone database parse issue
2018-01-16 12:46:45 -05:00
Edward Diener
b1193100b0 Merge pull request #70 from jeking3/issue-56
issue-56: fix 32/64 bit test issue with previous fix
2018-01-07 16:24:22 -05:00
James E. King III
e78132c031 issue-56: fix 32/64 bit test issue with previous fix 2018-01-07 11:23:14 -05:00