mirror of
https://github.com/boostorg/date_time.git
synced 2026-07-21 13:13:29 +00:00
Compare commits
51 Commits
boost-1.75.0
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| 6248d64ed9 | |||
| 6b387c4969 | |||
| 69c45b7a2b | |||
| 19ffa6232d | |||
| 363e04d7ec | |||
| 64c1df1e3e | |||
| 645574e5df | |||
| 85e637cb32 | |||
| 39714907b7 | |||
| abef5a147a | |||
| ddcfd00391 | |||
| c02d713cef | |||
| b81ed2874f | |||
| 0aed920bfb | |||
| f972dc9656 | |||
| 7677fdce5a | |||
| 8729945096 | |||
| cbad9bcec9 | |||
| 64fe6586fe | |||
| a20a5c8b7c | |||
| ff77162265 | |||
| 0be5d92c90 | |||
| 33dc6136f1 | |||
| 7156392706 | |||
| 561ccb878d | |||
| 3feaece6d2 | |||
| 9970590094 | |||
| 4b97311ca7 | |||
| a94bcf288d | |||
| 8011fdf0bc | |||
| 15be01a02d | |||
| acbee0dc6a | |||
| aa9c5dfd48 | |||
| 47de78e4fc | |||
| 79ca1aa0a7 | |||
| ccc21804bd | |||
| 31c983b256 | |||
| f92b2b3bfc | |||
| b43d605ad2 | |||
| 61677ba228 | |||
| 30795441e4 | |||
| 77495803c1 | |||
| 247424d08d | |||
| 76852e4aab | |||
| 356c5c2600 | |||
| 3d55c15cbb | |||
| d77ee59bc2 | |||
| 5093074e0e | |||
| ecf042f538 | |||
| d0b3c1da88 | |||
| e9a9ce3e35 |
+116
@@ -0,0 +1,116 @@
|
||||
# Copyright 2016, 2017 Peter Dimov
|
||||
# Copyright 2017 - 2019 James E. King III
|
||||
# Copyright 2019 - 2021 Alexander Grund
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#
|
||||
# Generic Appveyor build script for boostorg repositories
|
||||
# See: https://github.com/boostorg/boost-ci/
|
||||
#
|
||||
# Instructions for customizing this script for your library:
|
||||
#
|
||||
# 1. Customize the compilers and language levels you want.
|
||||
# 2. If you have more than include/, src/, test/, example/, examples/,
|
||||
# benchmark/ or tools/ directories, set the environment variable DEPINST.
|
||||
# For example if your build uses code in "bench/" and "fog/" directories:
|
||||
# - DEPINST: --include bench --include fog
|
||||
# 3. Enable pull request builds in your boostorg/<library> account.
|
||||
#
|
||||
# That's it - the script will do everything else for you.
|
||||
#
|
||||
|
||||
version: 1.0.{build}-{branch}
|
||||
|
||||
shallow_clone: true
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /bugfix\/.*/
|
||||
- /feature\/.*/
|
||||
- /fix\/.*/
|
||||
- /pr\/.*/
|
||||
|
||||
matrix:
|
||||
fast_finish: false
|
||||
# Adding MAYFAIL to any matrix job allows it to fail but the build stays green:
|
||||
allow_failures:
|
||||
- MAYFAIL: true
|
||||
|
||||
environment:
|
||||
global:
|
||||
B2_CI_VERSION: 1
|
||||
GIT_FETCH_JOBS: 4
|
||||
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
|
||||
# to use the default for a given environment, comment it out; recommend you build debug and release however:
|
||||
# on Windows it is important to exercise all the possibilities, especially shared vs static, however most
|
||||
# libraries that care about this exercise it in their Jamfiles...
|
||||
B2_ADDRESS_MODEL: 32,64
|
||||
B2_LINK: shared,static
|
||||
# B2_THREADING: threading=multi,single
|
||||
B2_VARIANT: release
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
matrix:
|
||||
- FLAVOR: Visual Studio 2017 C++2a Strict
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
B2_CXXFLAGS: -permissive-
|
||||
B2_CXXSTD: 2a
|
||||
B2_TOOLSET: msvc-14.1
|
||||
|
||||
- FLAVOR: Visual Studio 2017 C++14/17
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
B2_CXXSTD: 14,17
|
||||
B2_TOOLSET: msvc-14.1
|
||||
|
||||
- FLAVOR: clang-cl
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
B2_ADDRESS_MODEL: 64
|
||||
B2_CXXSTD: 11,14,17
|
||||
B2_TOOLSET: clang-win
|
||||
|
||||
- FLAVOR: Visual Studio 2015, 2013
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
B2_TOOLSET: msvc-12.0,msvc-14.0
|
||||
|
||||
- FLAVOR: Visual Studio 2008, 2010, 2012
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
B2_TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0
|
||||
B2_ADDRESS_MODEL: 32 # No 64bit support
|
||||
|
||||
- FLAVOR: cygwin (32-bit)
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ADDPATH: C:\cygwin\bin;
|
||||
B2_ADDRESS_MODEL: 32
|
||||
B2_CXXSTD: 03,11,14,1z
|
||||
B2_THREADING: threadapi=pthread
|
||||
B2_TOOLSET: gcc
|
||||
|
||||
- FLAVOR: cygwin (64-bit)
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ADDPATH: C:\cygwin64\bin;
|
||||
B2_ADDRESS_MODEL: 64
|
||||
B2_CXXSTD: 03,11,14,1z
|
||||
B2_THREADING: threadapi=pthread
|
||||
B2_TOOLSET: gcc
|
||||
|
||||
- FLAVOR: mingw64
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
ADDPATH: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;
|
||||
B2_ADDRESS_MODEL: 64
|
||||
B2_CXXSTD: 03,11,14,17,2a
|
||||
B2_TOOLSET: gcc
|
||||
|
||||
install:
|
||||
- git clone --depth 1 https://github.com/boostorg/boost-ci.git C:\boost-ci-cloned
|
||||
# Copy ci folder if not testing Boost.CI
|
||||
- if NOT "%APPVEYOR_PROJECT_NAME%" == "boost-ci" xcopy /s /e /q /i /y C:\boost-ci-cloned\ci .\ci
|
||||
- rmdir /s /q C:\boost-ci-cloned
|
||||
- ci\appveyor\install.bat
|
||||
|
||||
build: off
|
||||
|
||||
test_script: ci\build.bat
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Copyright 2019 - 2021 Alexander Grund
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
# Sample codecov configuration file. Edit as required
|
||||
|
||||
codecov:
|
||||
max_report_age: off
|
||||
require_ci_to_pass: yes
|
||||
notify:
|
||||
# Increase this if you have multiple coverage collection jobs
|
||||
after_n_builds: 2
|
||||
wait_for_ci: yes
|
||||
|
||||
# Change how pull request comments look
|
||||
comment:
|
||||
layout: "reach,diff,flags,files,footer"
|
||||
|
||||
# Ignore specific files or folders. Glob patterns are supported.
|
||||
# See https://docs.codecov.com/docs/ignoring-paths
|
||||
ignore:
|
||||
- libs/date_time/test/
|
||||
- test
|
||||
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# Copyright 2020-2021 Peter Dimov
|
||||
# Copyright 2021 Andrey Semashev
|
||||
# Copyright 2021-2024 Alexander Grund
|
||||
# Copyright 2022-2025 James E. King III
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
# This workflow uses the Boost.CI reusable workflow which builds a variety of
|
||||
# configurations of your project, runs tests, and generates code coverage reports.
|
||||
#
|
||||
# To use it, copy this file into your repository as `.github/workflows/ci.yml` and
|
||||
# customize it appropriately.
|
||||
#
|
||||
---
|
||||
name: Boost.CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- bugfix/**
|
||||
- feature/**
|
||||
- fix/**
|
||||
- pr/**
|
||||
paths-ignore:
|
||||
- LICENSE
|
||||
- meta/**
|
||||
- README.md
|
||||
|
||||
jobs:
|
||||
call-boost-ci:
|
||||
name: Run Boost.CI
|
||||
uses: boostorg/boost-ci/.github/workflows/reusable.yml@master
|
||||
with:
|
||||
# no endian branches
|
||||
enable_multiarch: false
|
||||
# serialization has issues, not enough time to add suppressions
|
||||
enable_sanitizers: false
|
||||
# these compilers fail
|
||||
exclude_compiler: 'gcc-4.7,gcc-4.8,gcc-4.9,gcc-5,clang-3.5,clang-3.6,clang-3.7,clang-3.8'
|
||||
# the tests take a while; this reduces the load a bit and there isn't any C++20 specific code
|
||||
exclude_cxxstd: '98,03,0x,2a,20'
|
||||
secrets:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}
|
||||
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
-231
@@ -1,231 +0,0 @@
|
||||
# Copyright 2016 Peter Dimov
|
||||
# Copyright 2017 - 2019 James E. King III
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#
|
||||
# Generic Travis CI build script for boostorg repositories
|
||||
# See: https://github.com/boostorg/boost-ci
|
||||
#
|
||||
# Instructions for customizing this script for your library:
|
||||
#
|
||||
# 1. Customize the compilers and language levels you want in the 'jobs'.
|
||||
# 2. If you have more than include/, src/, test/, example/, examples/, or
|
||||
# tools/ directories, modify your Travis CI project and add the environment
|
||||
# variable DEPINST. For example if your build uses code in "bench/" and
|
||||
# "fog/" directories, then set DEPINST to the following:
|
||||
# --include bench --include fog
|
||||
# 3. If you want to enable Coverity Scan, you need to provide the environment
|
||||
# variables COVERITY_SCAN_TOKEN and COVERITY_SCAN_NOTIFICATION_EMAIL in
|
||||
# your github settings.
|
||||
# 4. Enable pull request builds in your boostorg/<library> account.
|
||||
#
|
||||
# That's it - the scripts will do everything else for you.
|
||||
|
||||
dist: xenial
|
||||
language: cpp
|
||||
|
||||
env:
|
||||
global:
|
||||
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
|
||||
# - B2_ADDRESS_MODEL=address-model=64,32
|
||||
# - B2_LINK=link=shared,static
|
||||
# - B2_THREADING=threading=multi,single
|
||||
- B2_VARIANT=variant=release
|
||||
|
||||
install:
|
||||
- git clone https://github.com/boostorg/boost-ci.git boost-ci
|
||||
- cp -pr boost-ci/ci boost-ci/.codecov.yml .
|
||||
- source ci/travis/install.sh
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- binutils-gold
|
||||
- gdb
|
||||
- libc6-dbg
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /bugfix\/.*/
|
||||
- /feature\/.*/
|
||||
- /fix\/.*/
|
||||
- /pr\/.*/
|
||||
|
||||
script:
|
||||
- cd $BOOST_ROOT/libs/$SELF
|
||||
- ci/travis/build.sh
|
||||
|
||||
#
|
||||
# Default toolsets in Ubuntu
|
||||
#
|
||||
# trusty xenial bionic
|
||||
# 14.04 16.04 18.04
|
||||
# ------ ------ ------
|
||||
# clang 3.4 3.8 6.0
|
||||
# gcc 4.8.2 5.3.1 7.3.0
|
||||
#
|
||||
|
||||
anchors:
|
||||
clang-38: &clang-38 { apt: { packages: [ "clang-3.8",
|
||||
"libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-3.8",
|
||||
"ubuntu-toolchain-r-test" ] } }
|
||||
clang-4: &clang-4 { apt: { packages: [ "clang-4.0",
|
||||
"libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-4.0",
|
||||
"ubuntu-toolchain-r-test" ] } }
|
||||
clang-5: &clang-5 { apt: { packages: [ "clang-5.0",
|
||||
"libstdc++-7-dev" ], sources: [ "llvm-toolchain-xenial-5.0",
|
||||
"ubuntu-toolchain-r-test" ] } }
|
||||
clang-6: &clang-6 { apt: { packages: [ "clang-6.0",
|
||||
"libc6-dbg",
|
||||
"libc++-dev",
|
||||
"libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-6.0",
|
||||
"ubuntu-toolchain-r-test" ] } }
|
||||
clang-7: &clang-7 { apt: { packages: [ "clang-7",
|
||||
"libc6-dbg",
|
||||
"libc++-dev",
|
||||
"libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-7",
|
||||
"ubuntu-toolchain-r-test" ] } }
|
||||
clang-8: &clang-8 { apt: { packages: [ "clang-8",
|
||||
"libc6-dbg",
|
||||
"libc++-dev",
|
||||
"libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-8",
|
||||
"ubuntu-toolchain-r-test" ] } }
|
||||
gcc-48: &gcc-48 { apt: { packages: [ "g++-4.8" ] } }
|
||||
gcc-49: &gcc-49 { apt: { packages: [ "g++-4.9" ], sources: [ "ubuntu-toolchain-r-test" ] } }
|
||||
gcc-5: &gcc-5 { apt: { packages: [ "g++-5" ] } }
|
||||
gcc-6: &gcc-6 { apt: { packages: [ "g++-6" ], sources: [ "ubuntu-toolchain-r-test" ] } }
|
||||
gcc-7: &gcc-7 { apt: { packages: [ "g++-7" ], sources: [ "ubuntu-toolchain-r-test" ] } }
|
||||
gcc-8: &gcc-8 { apt: { packages: [ "g++-8" ], sources: [ "ubuntu-toolchain-r-test" ] } }
|
||||
gcc-9: &gcc-9 { apt: { packages: [ "g++-9" ], sources: [ "ubuntu-toolchain-r-test" ] } }
|
||||
|
||||
jobs:
|
||||
allow_failures:
|
||||
# https://github.com/boostorg/date_time/issues/111
|
||||
- env:
|
||||
- COMMENT=ubsan
|
||||
- B2_VARIANT=variant=debug
|
||||
- B2_TOOLSET=gcc-8
|
||||
- B2_CXXSTD=03,11,14
|
||||
- B2_CXXFLAGS="undefined-sanitizer=norecover"
|
||||
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
|
||||
- B2_LINKFLAGS="linkflags=-fuse-ld=gold"
|
||||
- UBSAN_OPTIONS=print_stacktrace=1
|
||||
- BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
|
||||
|
||||
include:
|
||||
# libstdc++
|
||||
- { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI
|
||||
env: [ "B2_TOOLSET=gcc-4.8", "B2_CXXSTD=03,11", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *gcc-48 }
|
||||
- { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI
|
||||
env: [ "B2_TOOLSET=gcc-4.9", "B2_CXXSTD=03,11", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *gcc-49 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=gcc-5", "B2_CXXSTD=03,11" ], addons: *gcc-5 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=gcc-6", "B2_CXXSTD=11,14", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *gcc-6 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=gcc-7", "B2_CXXSTD=14,17", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *gcc-7 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=gcc-8", "B2_CXXSTD=17,2a", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *gcc-8 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=gcc-9", "B2_CXXSTD=17,2a", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *gcc-9 }
|
||||
- { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI
|
||||
env: [ "B2_TOOLSET=clang-3.8", "B2_CXXSTD=03,11", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *clang-38 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=clang-4.0", "B2_CXXSTD=11,14", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *clang-4 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=clang-5.0", "B2_CXXSTD=11,14", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *clang-5 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=14,17", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *clang-6 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=clang-7", "B2_CXXSTD=17,2a", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *clang-7 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=clang-8", "B2_CXXSTD=17,2a", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ], addons: *clang-8 }
|
||||
|
||||
# libc++
|
||||
- { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=03,11,14",
|
||||
"B2_CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 }
|
||||
- { os: "osx" , env: [ "B2_TOOLSET=clang", "B2_CXXSTD=03,11,17", "BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1" ] }
|
||||
|
||||
# to enable Intel ICC define INTEL_ICC_SERIAL_NUMBER and the following:
|
||||
# - { os: "linux", env: [ "B2_TOOLSET=intel-linux", "B2_CXXSTD=11,14,17" ], addons: *gcc-7,
|
||||
# script: cd $BOOST_ROOT/libs/$SELF && ci/travis/intelicc.sh }
|
||||
|
||||
- os: linux
|
||||
env:
|
||||
- COMMENT=codecov.io
|
||||
- B2_CXXSTD=03,11
|
||||
- B2_TOOLSET=gcc-8
|
||||
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
|
||||
- BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
|
||||
addons: *gcc-8
|
||||
script:
|
||||
- cd $BOOST_ROOT/libs/$SELF
|
||||
- ci/travis/codecov.sh
|
||||
|
||||
- os: linux
|
||||
env:
|
||||
- COMMENT=asan
|
||||
- B2_VARIANT=variant=debug
|
||||
- B2_TOOLSET=gcc-8
|
||||
- B2_CXXSTD=03,11,14
|
||||
- B2_CXXFLAGS="address-sanitizer=norecover"
|
||||
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
|
||||
- BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
|
||||
addons: *gcc-8
|
||||
|
||||
- os: linux
|
||||
env:
|
||||
- COMMENT=tsan
|
||||
- B2_VARIANT=variant=debug
|
||||
- B2_TOOLSET=gcc-8
|
||||
- B2_CXXSTD=03,11,14
|
||||
- B2_CXXFLAGS="thread-sanitizer=norecover"
|
||||
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
|
||||
- BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
|
||||
addons: *gcc-8
|
||||
|
||||
- os: linux
|
||||
env:
|
||||
- COMMENT=ubsan
|
||||
- B2_VARIANT=variant=debug
|
||||
- B2_TOOLSET=gcc-8
|
||||
- B2_CXXSTD=03,11,14
|
||||
- B2_CXXFLAGS="undefined-sanitizer=norecover"
|
||||
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
|
||||
# https://github.com/boostorg/build/issues/451 using the gold linker to work around an issue
|
||||
- B2_LINKFLAGS="linkflags=-fuse-ld=gold"
|
||||
- UBSAN_OPTIONS=print_stacktrace=1
|
||||
- BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
|
||||
addons: *gcc-8
|
||||
|
||||
- os: linux
|
||||
env:
|
||||
- COMMENT=valgrind
|
||||
- B2_TOOLSET=clang-6.0
|
||||
- B2_CXXSTD=03,11,14
|
||||
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
|
||||
- B2_VARIANT=variant=debug
|
||||
- B2_TESTFLAGS=testing.launcher=valgrind
|
||||
- BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
|
||||
- VALGRIND_OPTS=--error-exitcode=1
|
||||
addons: *clang-6
|
||||
script:
|
||||
- cd $BOOST_ROOT/libs/$SELF
|
||||
- ci/travis/valgrind.sh
|
||||
|
||||
# - os: linux
|
||||
# env:
|
||||
# - COMMENT=cppcheck
|
||||
# script:
|
||||
# - cd $BOOST_ROOT/libs/$SELF
|
||||
# - ci/travis/cppcheck.sh
|
||||
|
||||
#################### Jobs to run on pushes to master, develop ###################
|
||||
|
||||
# Coverity Scan
|
||||
- os: linux
|
||||
if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push))
|
||||
env:
|
||||
- COMMENT="Coverity Scan"
|
||||
- B2_TOOLSET=clang
|
||||
- BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
|
||||
script:
|
||||
- cd $BOOST_ROOT/libs/$SELF
|
||||
- ci/travis/coverity.sh
|
||||
|
||||
notifications:
|
||||
email:
|
||||
false
|
||||
@@ -0,0 +1,4 @@
|
||||
# https://github.com/boostorg/serialization/issues/122
|
||||
vptr:/usr/include/c++/*/bits/ios_base.h
|
||||
# https://github.com/boostorg/serialization/issues/193
|
||||
# could not figure out how to suppress it
|
||||
+44
-13
@@ -1,21 +1,52 @@
|
||||
# Copyright 2020 Tarmo Pikaro
|
||||
# Generated by `boostdep --cmake date_time`
|
||||
# Copyright 2020 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required( VERSION 3.5 )
|
||||
project( BoostDateTime LANGUAGES CXX)
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
add_library( boost_date_time
|
||||
src/gregorian/greg_month.cpp
|
||||
)
|
||||
add_library( Boost::date_time ALIAS boost_date_time )
|
||||
project(boost_date_time VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
target_include_directories( boost_date_time PUBLIC include )
|
||||
|
||||
target_link_libraries( boost_date_time
|
||||
PUBLIC
|
||||
Boost::config
|
||||
add_library(boost_date_time
|
||||
src/gregorian/greg_month.cpp
|
||||
)
|
||||
|
||||
add_library(Boost::date_time ALIAS boost_date_time)
|
||||
|
||||
target_include_directories(boost_date_time PUBLIC include)
|
||||
|
||||
target_link_libraries(boost_date_time
|
||||
PUBLIC
|
||||
Boost::algorithm
|
||||
Boost::assert
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::io
|
||||
Boost::lexical_cast
|
||||
Boost::numeric_conversion
|
||||
Boost::range
|
||||
Boost::smart_ptr
|
||||
Boost::throw_exception
|
||||
Boost::tokenizer
|
||||
Boost::type_traits
|
||||
Boost::utility
|
||||
Boost::winapi
|
||||
)
|
||||
|
||||
target_compile_definitions(boost_date_time
|
||||
PUBLIC BOOST_DATE_TIME_NO_LIB
|
||||
PRIVATE BOOST_DATE_TIME_SOURCE
|
||||
)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(boost_date_time PUBLIC BOOST_DATE_TIME_DYN_LINK)
|
||||
else()
|
||||
target_compile_definitions(boost_date_time PUBLIC BOOST_DATE_TIME_STATIC_LINK)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Boost.DateTime Library Jamfile
|
||||
#
|
||||
# Copyright (c) 2018 James E. King III
|
||||
#
|
||||
# Use, modification, and distribution are subject to the
|
||||
# Boost Software License, Version 1.0. (See accompanying file
|
||||
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# please order by name to ease maintenance
|
||||
build-project example ;
|
||||
build-project test ;
|
||||
@@ -6,28 +6,31 @@ Distributed under the [Boost Software License, Version 1.0](http://www.boost.org
|
||||
|
||||
### Properties
|
||||
|
||||
* C++03
|
||||
* Requires Linking
|
||||
* C++11
|
||||
* Header only
|
||||
|
||||
### Build Status
|
||||
|
||||
Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
|
||||
:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
|
||||
[`master`](https://github.com/boostorg/date_time/tree/master) | [](https://travis-ci.org/boostorg/date_time) | [](https://ci.appveyor.com/project/jeking3/date-time-1evbf) | [](https://scan.coverity.com/projects/boostorg-date_time) | [](https://codecov.io/gh/boostorg/date_time/branch/master) | [](https://pdimov.github.io/boostdep-report/master/date_time.html) | [](http://www.boost.org/doc/libs/master/doc/html/date_time.html) | [](http://www.boost.org/development/tests/master/developer/date_time.html)
|
||||
[`develop`](https://github.com/boostorg/date_time/tree/develop) | [](https://travis-ci.org/boostorg/date_time) | [](https://ci.appveyor.com/project/boostorg/date_time/branch/develop) | [](https://scan.coverity.com/projects/boostorg-date_time) | [](https://codecov.io/gh/boostorg/date_time/branch/develop) | [](https://pdimov.github.io/boostdep-report/develop/date_time.html) | [](http://www.boost.org/doc/libs/develop/doc/html/date_time.html) | [](http://www.boost.org/development/tests/develop/developer/date_time.html)
|
||||
<!-- boost-ci/tools/makebadges.sh --repo date_time --appveyorbadge upf5c528fy09fudk --codecovbadge nDoh7t8f6g --coverity 14908 -->
|
||||
| Branch | GHA CI | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
|
||||
| :-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
|
||||
| [`master`](https://github.com/boostorg/date_time/tree/master) | [](https://github.com/boostorg/date_time/actions?query=branch:master) | [](https://ci.appveyor.com/project/cppalliance/date-time/branch/master) | [](https://scan.coverity.com/projects/boostorg-date_time) | [](https://codecov.io/gh/boostorg/date_time/tree/master) | [](https://pdimov.github.io/boostdep-report/master/date_time.html) | [](https://www.boost.org/doc/libs/master/libs/date_time) | [](https://www.boost.org/development/tests/master/developer/date_time.html) |
|
||||
| [`develop`](https://github.com/boostorg/date_time/tree/develop) | [](https://github.com/boostorg/date_time/actions?query=branch:develop) | [](https://ci.appveyor.com/project/cppalliance/date-time/branch/develop) | [](https://scan.coverity.com/projects/boostorg-date_time) | [](https://codecov.io/gh/boostorg/date_time/tree/develop) | [](https://pdimov.github.io/boostdep-report/develop/date_time.html) | [](https://www.boost.org/doc/libs/develop/libs/date_time) | [](https://www.boost.org/development/tests/develop/developer/date_time.html) |
|
||||
|
||||
### Directories
|
||||
|
||||
| Name | Purpose |
|
||||
| --------- | ------------------------------ |
|
||||
| `build` | build script for link library |
|
||||
| `data` | timezone database |
|
||||
| `doc` | documentation |
|
||||
| `example` | use case examples |
|
||||
| `include` | headers |
|
||||
| `src` | source code for link library |
|
||||
| `test` | unit tests |
|
||||
| `xmldoc` | additional documentation |
|
||||
Note that the built library is only for build backward compatibility and contains no symbols. date_time is now header only.
|
||||
|
||||
| Name | Purpose |
|
||||
| --------- | --------------------------------------- |
|
||||
| `build` | build script for optional lib build |
|
||||
| `data` | timezone database |
|
||||
| `doc` | documentation |
|
||||
| `example` | use case examples |
|
||||
| `include` | headers |
|
||||
| `src` | source code for optional link library |
|
||||
| `test` | unit tests |
|
||||
| `xmldoc` | documentation source |
|
||||
|
||||
### More information
|
||||
|
||||
@@ -35,4 +38,3 @@ Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs |
|
||||
* [Report bugs](https://github.com/boostorg/date_time/issues): Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
|
||||
* [Submit Pull Requests](https://github.com/boostorg/date_time/pulls) against the **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt). Be sure to include tests proving your changes work properly.
|
||||
* Discussions about the library are held on the [Boost developers mailing list](http://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](http://www.boost.org/community/policy.html) before posting and add the `[date_time]` tag at the beginning of the subject line.
|
||||
|
||||
|
||||
-157
@@ -1,157 +0,0 @@
|
||||
# Copyright 2016, 2017 Peter Dimov
|
||||
# Copyright (C) 2017 - 2019 James E. King III
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#
|
||||
# Generic Appveyor build script for boostorg repositories
|
||||
# See: https://github.com/boostorg/boost-ci/
|
||||
#
|
||||
# Instructions for customizing this script for your library:
|
||||
#
|
||||
# 1. Customize the compilers and language levels you want.
|
||||
# 2. If you have more than include/, src/, test/, example/, examples/,
|
||||
# benchmark/ or tools/ directories, set the environment variable DEPINST.
|
||||
# For example if your build uses code in "bench/" and "fog/" directories:
|
||||
# - DEPINST: --include bench --include fog
|
||||
# 3. Enable pull request builds in your boostorg/<library> account.
|
||||
#
|
||||
# That's it - the script will do everything else for you.
|
||||
#
|
||||
|
||||
version: 1.0.{build}-{branch}
|
||||
|
||||
shallow_clone: true
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /bugfix\/.*/
|
||||
- /feature\/.*/
|
||||
- /fix\/.*/
|
||||
- /pr\/.*/
|
||||
|
||||
matrix:
|
||||
# Adding MAYFAIL to any matrix job allows it to fail but the build stays green:
|
||||
allow_failures:
|
||||
- MAYFAIL: true
|
||||
|
||||
environment:
|
||||
global:
|
||||
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
|
||||
# to use the default for a given environment, comment it out; recommend you build debug and release however:
|
||||
# on Windows it is important to exercise all the possibilities, especially shared vs static, however most
|
||||
# libraries that care about this exercise it in their Jamfiles...
|
||||
# B2_ADDRESS_MODEL: address-model=64,32
|
||||
# B2_THREADING: threading=multi,single
|
||||
B2_LINK: link=shared,static
|
||||
B2_VARIANT: variant=release
|
||||
|
||||
matrix:
|
||||
- FLAVOR: Visual Studio 2019
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
B2_ADDRESS_MODEL: address-model=64
|
||||
B2_CXXFLAGS: cxxflags=-permissive-
|
||||
B2_CXXSTD: latest # 2a
|
||||
B2_TOOLSET: msvc-14.2
|
||||
|
||||
- FLAVOR: Visual Studio 2017 C++2a Strict
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
B2_ADDRESS_MODEL: address-model=64
|
||||
B2_CXXFLAGS: cxxflags=-permissive-
|
||||
B2_CXXSTD: latest # 2a
|
||||
B2_TOOLSET: msvc-14.1
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
- FLAVOR: Visual Studio 2017 C++17
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
B2_ADDRESS_MODEL: address-model=64
|
||||
B2_CXXSTD: 17
|
||||
B2_TOOLSET: msvc-14.1
|
||||
B2_VARIANT: variant=debug
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
- FLAVOR: Visual Studio 2017 C++14 (Default)
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
B2_ADDRESS_MODEL: address-model=64,32
|
||||
B2_TOOLSET: msvc-14.1
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
- FLAVOR: clang-cl
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
B2_ADDRESS_MODEL: address-model=64
|
||||
B2_CXXSTD: 11
|
||||
B2_TOOLSET: clang-win
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
- FLAVOR: Visual Studio 2015 C++14 (Default)
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
B2_ADDRESS_MODEL: address-model=64,32
|
||||
B2_TOOLSET: msvc-14.0
|
||||
B2_VARIANT: variant=debug
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
- FLAVOR: Visual Studio 2010, 2012, 2013
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
B2_TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
- FLAVOR: cygwin (32-bit)
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ADDPATH: C:\cygwin\bin;
|
||||
B2_ADDRESS_MODEL: address-model=32
|
||||
B2_CXXSTD: 03,11
|
||||
# https://github.com/boostorg/test/issues/144
|
||||
B2_DEFINES: define=_POSIX_C_SOURCE=200112L
|
||||
B2_THREADING: threadapi=pthread
|
||||
B2_TOOLSET: gcc
|
||||
B2_VARIANT: variant=debug
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
- FLAVOR: cygwin (64-bit)
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ADDPATH: C:\cygwin64\bin;
|
||||
B2_ADDRESS_MODEL: address-model=64
|
||||
B2_CXXSTD: 11,17
|
||||
# https://github.com/boostorg/test/issues/144
|
||||
B2_DEFINES: define=_POSIX_C_SOURCE=200112L define=__USE_ISOC99
|
||||
B2_THREADING: threadapi=pthread
|
||||
B2_TOOLSET: gcc
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
- FLAVOR: mingw32
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARCH: i686
|
||||
B2_ADDRESS_MODEL: address-model=32
|
||||
B2_CXXSTD: 03,11
|
||||
SCRIPT: ci\appveyor\mingw.bat
|
||||
B2_VARIANT: variant=debug
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
- FLAVOR: mingw64
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARCH: x86_64
|
||||
B2_ADDRESS_MODEL: address-model=64
|
||||
B2_CXXSTD: 11,17
|
||||
B2_DEFINES: define=__USE_ISOC99
|
||||
SCRIPT: ci\appveyor\mingw.bat
|
||||
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: 1
|
||||
|
||||
install:
|
||||
- set SELF=%APPVEYOR_PROJECT_NAME:-=_%
|
||||
- git clone https://github.com/boostorg/boost-ci.git C:\boost-ci
|
||||
- xcopy /s /e /q /i C:\boost-ci\ci .\ci
|
||||
- ci\appveyor\install.bat
|
||||
|
||||
build: off
|
||||
|
||||
test_script:
|
||||
- set SELF=%APPVEYOR_PROJECT_NAME:-=_%
|
||||
- PATH=%ADDPATH%%PATH%
|
||||
# The definition of B2_TOOLCXX omits B2_CXXSTD= if it was not defined above
|
||||
- IF NOT DEFINED B2_CXXSTD (SET B2_TOOLCXX=toolset=%B2_TOOLSET%) ELSE (SET B2_TOOLCXX=toolset=%B2_TOOLSET% cxxstd=%B2_CXXSTD%)
|
||||
# Echo the complete build command to the build log
|
||||
- IF NOT DEFINED SCRIPT (ECHO b2 libs/%SELF:\=/% %B2_TOOLCXX% %B2_CXXFLAGS% %B2_DEFINES% %B2_THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
|
||||
# Now go build...
|
||||
- IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF:\=/% %B2_TOOLCXX% %B2_CXXFLAGS% %B2_DEFINES% %B2_THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
|
||||
@@ -0,0 +1,37 @@
|
||||
# Copyright René Ferdinand Rivera Morell 2023-2024
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
require-b2 5.2 ;
|
||||
|
||||
constant boost_dependencies :
|
||||
/boost/algorithm//boost_algorithm
|
||||
/boost/assert//boost_assert
|
||||
/boost/config//boost_config
|
||||
/boost/core//boost_core
|
||||
/boost/io//boost_io
|
||||
/boost/lexical_cast//boost_lexical_cast
|
||||
/boost/numeric_conversion//boost_numeric_conversion
|
||||
/boost/range//boost_range
|
||||
/boost/smart_ptr//boost_smart_ptr
|
||||
/boost/throw_exception//boost_throw_exception
|
||||
/boost/tokenizer//boost_tokenizer
|
||||
/boost/type_traits//boost_type_traits
|
||||
/boost/utility//boost_utility
|
||||
/boost/winapi//boost_winapi ;
|
||||
|
||||
project /boost/date_time
|
||||
: common-requirements
|
||||
<include>include
|
||||
;
|
||||
|
||||
explicit
|
||||
[ alias boost_date_time : build//boost_date_time ]
|
||||
[ alias all : boost_date_time example test ]
|
||||
;
|
||||
|
||||
call-if : boost-library date_time
|
||||
: install boost_date_time
|
||||
;
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
# Copyright (c) 2002-2005 CrystalClear Software, Inc.
|
||||
# Use, modification and distribution is subject to the
|
||||
# Use, modification and distribution is subject to the
|
||||
# Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
@@ -7,18 +7,18 @@
|
||||
#
|
||||
|
||||
|
||||
project boost/date_time
|
||||
project
|
||||
: common-requirements <library>$(boost_dependencies)
|
||||
: requirements
|
||||
<define>DATE_TIME_INLINE
|
||||
<link>shared:<define>BOOST_ALL_DYN_LINK=1
|
||||
<link>shared:<define>BOOST_ALL_DYN_LINK=1
|
||||
: usage-requirements
|
||||
<define>DATE_TIME_INLINE
|
||||
<link>shared:<define>BOOST_DATE_TIME_DYN_LINK=1
|
||||
<define>BOOST_DATE_TIME_NO_LINK=1
|
||||
: source-location ../src
|
||||
;
|
||||
|
||||
# greg_month.cpp is now just a stub so that there is
|
||||
# still a boost_date_time library to link for backward compatibility
|
||||
lib boost_date_time : gregorian/greg_month.cpp ;
|
||||
|
||||
boost-install boost_date_time ;
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
require-b2 5.2 ;
|
||||
|
||||
###############################################################################
|
||||
alias boostdoc
|
||||
: ../xmldoc/date_time.xml
|
||||
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
project libs/date_time/example ;
|
||||
project : requirements <library>/boost/date_time//boost_date_time ;
|
||||
|
||||
exe dates_as_strings : gregorian/dates_as_strings.cpp ;
|
||||
exe days_alive : gregorian/days_alive.cpp ;
|
||||
@@ -18,19 +18,19 @@ exe days_since_year_start : gregorian/days_since_year_start.cpp ;
|
||||
|
||||
|
||||
exe local_utc_conversion : posix_time/local_utc_conversion.cpp
|
||||
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
;
|
||||
|
||||
exe print_hours : posix_time/print_hours.cpp
|
||||
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
;
|
||||
|
||||
exe time_math : posix_time/time_math.cpp
|
||||
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
;
|
||||
|
||||
exe time_periods : posix_time/time_periods.cpp
|
||||
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
;
|
||||
|
||||
exe simple_time_zone : local_time/simple_time_zone.cpp ;
|
||||
@@ -41,7 +41,7 @@ exe io_tutorial : tutorial/io_tutorial.cpp ;
|
||||
|
||||
# Copyright (c) 2002-2005
|
||||
# CrystalClear Software, Inc.
|
||||
# Subject to the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or
|
||||
# Subject to the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ main()
|
||||
date d(from_simple_string(s));
|
||||
std::cout << to_simple_string(d) << std::endl;
|
||||
|
||||
//Read ISO Standard(CCYYMMDD) and output ISO Extended
|
||||
//Read ISO 8601 Standard(CCYYMMDD) and output ISO 8601 Extended
|
||||
std::string ud("20011009"); //2001-Oct-09
|
||||
date d1(from_undelimited_string(ud));
|
||||
std::cout << to_iso_extended_string(d1) << std::endl;
|
||||
|
||||
@@ -83,7 +83,7 @@ int main()
|
||||
us_facet->format("%m/%d/%Y");
|
||||
std::cout << d1 << std::endl; // 10/01/2002
|
||||
|
||||
// English names, iso order (year-month-day), '-' separator
|
||||
// English names, ISO 8601 order (year-month-day), '-' separator
|
||||
us_facet->format("%Y-%b-%d");
|
||||
std::cout << d1 << std::endl; // 2002-Oct-01
|
||||
|
||||
|
||||
@@ -28,10 +28,6 @@
|
||||
|
||||
// Include extensions to date_duration - comment out to remove this feature
|
||||
#define BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES
|
||||
// these extensions are known to cause problems with gcc295
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
#undef BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES
|
||||
#endif
|
||||
|
||||
#if (defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) || BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT(0x581) ) )
|
||||
#define BOOST_DATE_TIME_NO_MEMBER_INIT
|
||||
@@ -123,26 +119,6 @@ namespace std {
|
||||
# define BOOST_DATE_TIME_DECL
|
||||
#endif
|
||||
|
||||
//
|
||||
// Automatically link to the correct build variant where possible.
|
||||
//
|
||||
#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_DATE_TIME_NO_LIB) && !defined(BOOST_DATE_TIME_SOURCE)
|
||||
//
|
||||
// Set the name of our library, this will get undef'ed by auto_link.hpp
|
||||
// once it's done with it:
|
||||
//
|
||||
#define BOOST_LIB_NAME boost_date_time
|
||||
//
|
||||
// If we're importing code from a dll, then tell auto_link.hpp about it:
|
||||
//
|
||||
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK)
|
||||
# define BOOST_DYN_LINK
|
||||
#endif
|
||||
//
|
||||
// And include the header that does the work:
|
||||
//
|
||||
#include <boost/config/auto_link.hpp>
|
||||
#endif // auto-linking disabled
|
||||
|
||||
#if defined(BOOST_HAS_THREADS)
|
||||
# if defined(_MSC_VER) || defined(__MWERKS__) || defined(__MINGW32__) || defined(__BORLANDC__)
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace date_time {
|
||||
/*!
|
||||
The date template represents an interface shell for a date class
|
||||
that is based on a year-month-day system such as the gregorian
|
||||
or iso systems. It provides basic operations to enable calculation
|
||||
or ISO 8601 systems. It provides basic operations to enable calculation
|
||||
and comparisons.
|
||||
|
||||
<b>Theory</b>
|
||||
|
||||
@@ -53,14 +53,14 @@ namespace date_time {
|
||||
}
|
||||
virtual duration_type get_offset(const date_type& current) const=0;
|
||||
virtual duration_type get_neg_offset(const date_type& current) const=0;
|
||||
date_type operator*() {return current_;}
|
||||
date_type* operator->() {return ¤t_;}
|
||||
bool operator< (const date_type& d) {return current_ < d;}
|
||||
bool operator<= (const date_type& d) {return current_ <= d;}
|
||||
bool operator> (const date_type& d) {return current_ > d;}
|
||||
bool operator>= (const date_type& d) {return current_ >= d;}
|
||||
bool operator== (const date_type& d) {return current_ == d;}
|
||||
bool operator!= (const date_type& d) {return current_ != d;}
|
||||
const date_type& operator*() const {return current_;}
|
||||
const date_type* operator->() const {return ¤t_;}
|
||||
bool operator< (const date_type& d) const {return current_ < d;}
|
||||
bool operator<= (const date_type& d) const {return current_ <= d;}
|
||||
bool operator> (const date_type& d) const {return current_ > d;}
|
||||
bool operator>= (const date_type& d) const {return current_ >= d;}
|
||||
bool operator== (const date_type& d) const {return current_ == d;}
|
||||
bool operator!= (const date_type& d) const {return current_ != d;}
|
||||
private:
|
||||
date_type current_;
|
||||
};
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace gregorian {
|
||||
std::basic_string<charT> s(date_time::date_formatter<date,date_time::iso_format<charT>,charT>::date_to_string(d.begin()));
|
||||
return s + sep + date_time::date_formatter<date,date_time::iso_format<charT>,charT>::date_to_string(d.last());
|
||||
}
|
||||
//! Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231
|
||||
//! Date period to ISO 8601 standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231
|
||||
/*!\ingroup date_format
|
||||
*/
|
||||
inline std::string to_iso_string(const date_period& d) {
|
||||
@@ -78,7 +78,7 @@ namespace gregorian {
|
||||
inline std::basic_string<charT> to_iso_extended_string_type(const date& d) {
|
||||
return date_time::date_formatter<date,date_time::iso_extended_format<charT>,charT>::date_to_string(d);
|
||||
}
|
||||
//! Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31
|
||||
//! Convert to ISO 8601 extended format string CCYY-MM-DD. Example 2002-12-31
|
||||
/*!\ingroup date_format
|
||||
*/
|
||||
inline std::string to_iso_extended_string(const date& d) {
|
||||
@@ -90,7 +90,7 @@ namespace gregorian {
|
||||
inline std::basic_string<charT> to_iso_string_type(const date& d) {
|
||||
return date_time::date_formatter<date,date_time::iso_format<charT>,charT>::date_to_string(d);
|
||||
}
|
||||
//! Convert to iso standard string YYYYMMDD. Example: 20021231
|
||||
//! Convert to ISO 8601 standard string YYYYMMDD. Example: 20021231
|
||||
/*!\ingroup date_format
|
||||
*/
|
||||
inline std::string to_iso_string(const date& d) {
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace gregorian {
|
||||
return std::string("[" + d1 + "/" + d2 + "]");
|
||||
}
|
||||
|
||||
//! Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231
|
||||
//! Date period to ISO 8601 standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231
|
||||
/*!\ingroup date_format
|
||||
*/
|
||||
inline std::string to_iso_string(const date_period& d) {
|
||||
@@ -44,14 +44,14 @@ namespace gregorian {
|
||||
}
|
||||
|
||||
|
||||
//! Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31
|
||||
//! Convert to ISO 8601 extended format string CCYY-MM-DD. Example 2002-12-31
|
||||
/*!\ingroup date_format
|
||||
*/
|
||||
inline std::string to_iso_extended_string(const date& d) {
|
||||
return date_time::date_formatter<date,date_time::iso_extended_format<char> >::date_to_string(d);
|
||||
}
|
||||
|
||||
//! Convert to iso standard string YYYYMMDD. Example: 20021231
|
||||
//! Convert to ISO 8601 standard string YYYYMMDD. Example: 20021231
|
||||
/*!\ingroup date_format
|
||||
*/
|
||||
inline std::string to_iso_string(const date& d) {
|
||||
|
||||
@@ -74,18 +74,8 @@ namespace gregorian {
|
||||
{}
|
||||
//! Constructor for infinities, not a date, max and min date
|
||||
BOOST_CXX14_CONSTEXPR explicit date(special_values sv):
|
||||
date_time::date<date, gregorian_calendar, date_duration>(date_rep_type::from_special(sv))
|
||||
{
|
||||
if (sv == min_date_time)
|
||||
{
|
||||
*this = date(1400, 1, 1);
|
||||
}
|
||||
if (sv == max_date_time)
|
||||
{
|
||||
*this = date(9999, 12, 31);
|
||||
}
|
||||
|
||||
}
|
||||
date_time::date<date, gregorian_calendar, date_duration>(from_special_adjusted(sv))
|
||||
{}
|
||||
//!Return the Julian Day number for the date.
|
||||
BOOST_CXX14_CONSTEXPR date_int_type julian_day() const
|
||||
{
|
||||
@@ -105,7 +95,7 @@ namespace gregorian {
|
||||
ymd_type ymd = year_month_day();
|
||||
return gregorian_calendar::modjulian_day_number(ymd);
|
||||
}
|
||||
//!Return the iso 8601 week number 1..53
|
||||
//!Return the ISO 8601 week number 1..53
|
||||
BOOST_CXX14_CONSTEXPR int week_number() const
|
||||
{
|
||||
ymd_type ymd = year_month_day();
|
||||
@@ -129,6 +119,15 @@ namespace gregorian {
|
||||
|
||||
private:
|
||||
|
||||
BOOST_CXX14_CONSTEXPR date_rep_type from_special_adjusted(special_values sv)
|
||||
{
|
||||
switch (sv)
|
||||
{
|
||||
case min_date_time: return gregorian_calendar::day_number(ymd_type(1400, 1, 1));
|
||||
case max_date_time: return gregorian_calendar::day_number(ymd_type(9999, 12, 31));
|
||||
default: return date_rep_type::from_special(sv);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
inline BOOST_CXX14_CONSTEXPR
|
||||
|
||||
@@ -64,12 +64,12 @@ namespace gregorian {
|
||||
return date_time::parse_date<date>(s, date_time::ymd_order_dmy);
|
||||
}
|
||||
|
||||
//! From iso type date string where with order year-month-day eg: 20020125
|
||||
//! From ISO 8601 type date string where with order year-month-day eg: 20020125
|
||||
inline date from_undelimited_string(const std::string& s) {
|
||||
return date_time::parse_undelimited_date<date>(s);
|
||||
}
|
||||
|
||||
//! From iso type date string where with order year-month-day eg: 20020125
|
||||
//! From ISO 8601 type date string where with order year-month-day eg: 20020125
|
||||
inline date date_from_iso_string(const std::string& s) {
|
||||
return date_time::parse_undelimited_date<date>(s);
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ namespace date_time {
|
||||
return d;
|
||||
}
|
||||
|
||||
//!Return the iso week number for the date
|
||||
/*!Implements the rules associated with the iso 8601 week number.
|
||||
//!Return the ISO 8601 week number for the date
|
||||
/*!Implements the rules associated with the ISO 8601 week number.
|
||||
Basically the rule is that Week 1 of the year is the week that contains
|
||||
January 4th or the week that contains the first Thursday in January.
|
||||
Reference for this algorithm is the Calendar FAQ by Claus Tondering, April 2000.
|
||||
@@ -77,7 +77,7 @@ namespace date_time {
|
||||
unsigned short a = static_cast<unsigned short>((14-ymd.month)/12);
|
||||
unsigned short y = static_cast<unsigned short>(ymd.year + 4800 - a);
|
||||
unsigned short m = static_cast<unsigned short>(ymd.month + 12*a - 3);
|
||||
unsigned long d = ymd.day + ((153*m + 2)/5) + 365*y + (y/4) - (y/100) + (y/400) - 32045;
|
||||
unsigned long d = static_cast<unsigned long>(ymd.day) + ((153*m + 2)/5) + 365*y + (y/4) - (y/100) + (y/400) - 32045;
|
||||
return static_cast<date_int_type>(d);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
namespace boost {
|
||||
namespace date_time {
|
||||
|
||||
//! Class to provide common iso formatting spec
|
||||
//! Class to provide common ISO 8601 formatting spec
|
||||
template<class charT>
|
||||
class iso_format_base {
|
||||
public:
|
||||
//! Describe month format -- its an integer in iso format
|
||||
//! Describe month format -- its an integer in ISO 8601 format
|
||||
static month_format_spec month_format()
|
||||
{
|
||||
return month_as_integer;
|
||||
@@ -40,17 +40,17 @@ public:
|
||||
return "-infinity";
|
||||
}
|
||||
|
||||
//! ISO char for a year -- used in durations
|
||||
//! ISO 8601 char for a year -- used in durations
|
||||
static charT year_sep_char()
|
||||
{
|
||||
return 'Y';
|
||||
}
|
||||
//! ISO char for a month
|
||||
//! ISO 8601 char for a month
|
||||
static charT month_sep_char()
|
||||
{
|
||||
return '-';
|
||||
}
|
||||
//! ISO char for a day
|
||||
//! ISO 8601 char for a day
|
||||
static charT day_sep_char()
|
||||
{
|
||||
return '-';
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
{
|
||||
return ':';
|
||||
}
|
||||
//! ISO char for a period
|
||||
//! ISO 8601 char for a period
|
||||
static charT period_start_char()
|
||||
{
|
||||
return 'P';
|
||||
@@ -143,11 +143,11 @@ public:
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
|
||||
//! Class to provide common iso formatting spec
|
||||
//! Class to provide common ISO 8601 formatting spec
|
||||
template<>
|
||||
class iso_format_base<wchar_t> {
|
||||
public:
|
||||
//! Describe month format -- its an integer in iso format
|
||||
//! Describe month format -- its an integer in ISO 8601 format
|
||||
static month_format_spec month_format()
|
||||
{
|
||||
return month_as_integer;
|
||||
@@ -169,17 +169,17 @@ public:
|
||||
return L"-infinity";
|
||||
}
|
||||
|
||||
//! ISO char for a year -- used in durations
|
||||
//! ISO 8601 char for a year -- used in durations
|
||||
static wchar_t year_sep_char()
|
||||
{
|
||||
return 'Y';
|
||||
}
|
||||
//! ISO char for a month
|
||||
//! ISO 8601 char for a month
|
||||
static wchar_t month_sep_char()
|
||||
{
|
||||
return '-';
|
||||
}
|
||||
//! ISO char for a day
|
||||
//! ISO 8601 char for a day
|
||||
static wchar_t day_sep_char()
|
||||
{
|
||||
return '-';
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
{
|
||||
return ':';
|
||||
}
|
||||
//! ISO char for a period
|
||||
//! ISO 8601 char for a period
|
||||
static wchar_t period_start_char()
|
||||
{
|
||||
return 'P';
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
|
||||
#endif // BOOST_NO_STD_WSTRING
|
||||
|
||||
//! Format description for iso normal YYYYMMDD
|
||||
//! Format description for ISO 8601 normal YYYYMMDD
|
||||
template<class charT>
|
||||
class iso_format : public iso_format_base<charT> {
|
||||
public:
|
||||
|
||||
@@ -315,7 +315,7 @@ namespace local_time {
|
||||
|
||||
//! Returns name of associated time zone or "Coordinated Universal Time".
|
||||
/*! Optional bool parameter will return time zone as an offset
|
||||
* (ie "+07:00" extended iso format). Empty string is returned for
|
||||
* (ie "+07:00" extended ISO 8601 format). Empty string is returned for
|
||||
* classes that do not use a time_zone */
|
||||
std::string zone_name(bool as_offset=false) const
|
||||
{
|
||||
@@ -349,7 +349,7 @@ namespace local_time {
|
||||
}
|
||||
//! Returns abbreviation of associated time zone or "UTC".
|
||||
/*! Optional bool parameter will return time zone as an offset
|
||||
* (ie "+0700" iso format). Empty string is returned for classes
|
||||
* (ie "+0700" ISO 8601 format). Empty string is returned for classes
|
||||
* that do not use a time_zone */
|
||||
std::string zone_abbrev(bool as_offset=false) const
|
||||
{
|
||||
|
||||
@@ -299,9 +299,7 @@ namespace date_time {
|
||||
inline BOOST_CXX14_CONSTEXPR
|
||||
bool period<point_rep,duration_rep>::intersects(const period<point_rep,duration_rep>& other) const
|
||||
{
|
||||
return ( contains(other.begin_) ||
|
||||
other.contains(begin_) ||
|
||||
((other.begin_ < begin_) && (other.last_ >= begin_)));
|
||||
return !is_null() && !other.is_null() && (begin_ < other.end()) && (other.begin_ < end());
|
||||
}
|
||||
|
||||
//! Returns the period of intersection or invalid range no intersection
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace posix_time {
|
||||
inline
|
||||
ptime from_time_t(std::time_t t)
|
||||
{
|
||||
return ptime(gregorian::date(1970,1,1)) + seconds(static_cast<long>(t));
|
||||
return ptime(gregorian::date(1970,1,1)) + seconds(t);
|
||||
}
|
||||
|
||||
//! Function that converts a ptime into a time_t
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace posix_time {
|
||||
throw; // rethrow original exception
|
||||
}
|
||||
else {
|
||||
// if the user want's to fail quietly, we simply set the failbit
|
||||
// if the user wants to fail quietly, we simply set the failbit
|
||||
is.setstate(std::ios_base::failbit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace posix_time {
|
||||
}// else
|
||||
return ss.str();
|
||||
}
|
||||
//! Time duration in iso format -hhmmss,fffffff Example: 10:09:03,0123456
|
||||
//! Time duration in ISO 8601 format -hhmmss.fffffff. Example: 10:09:03.0123456
|
||||
/*!\ingroup time_format
|
||||
*/
|
||||
inline std::string to_iso_string(time_duration td){
|
||||
@@ -215,7 +215,7 @@ namespace posix_time {
|
||||
return ts;
|
||||
}
|
||||
}
|
||||
//! Convert iso short form YYYYMMDDTHHMMSS where T is the date-time separator
|
||||
//! Convert ISO 8601 short form YYYYMMDDTHHMMSS where T is the date-time separator
|
||||
/*!\ingroup time_format
|
||||
*/
|
||||
inline std::string to_iso_string(ptime t){
|
||||
@@ -251,7 +251,7 @@ namespace posix_time {
|
||||
inline std::wstring to_simple_wstring(time_duration td) {
|
||||
return to_simple_string_type<wchar_t>(td);
|
||||
}
|
||||
//! Time duration in iso format -hhmmss,fffffff Example: 10:09:03,0123456
|
||||
//! Time duration in ISO 8601 format -hhmmss.fffffff. Example: 10:09:03.0123456
|
||||
/*!\ingroup time_format
|
||||
*/
|
||||
inline std::wstring to_iso_wstring(time_duration td){
|
||||
@@ -266,7 +266,7 @@ namespace posix_time {
|
||||
inline std::wstring to_simple_wstring(time_period tp){
|
||||
return to_simple_string_type<wchar_t>(tp);
|
||||
}
|
||||
//! Convert iso short form YYYYMMDDTHHMMSS where T is the date-time separator
|
||||
//! Convert ISO 8601 short form YYYYMMDDTHHMMSS where T is the date-time separator
|
||||
/*!\ingroup time_format
|
||||
*/
|
||||
inline std::wstring to_iso_wstring(ptime t){
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace posix_time {
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
//! Time duration in iso format -hhmmss,fffffff Example: 10:09:03,0123456
|
||||
//! Time duration in ISO 8601 format -hhmmss.fffffff. Example: 10:09:03.0123456
|
||||
/*!\ingroup time_format
|
||||
*/
|
||||
inline
|
||||
@@ -173,7 +173,7 @@ namespace posix_time {
|
||||
return std::string("[" + d1 + "/" + d2 +"]");
|
||||
}
|
||||
|
||||
//! Convert iso short form YYYYMMDDTHHMMSS where T is the date-time separator
|
||||
//! Convert ISO 8601 short form YYYYMMDDTHHMMSS where T is the date-time separator
|
||||
/*!\ingroup time_format
|
||||
*/
|
||||
inline
|
||||
|
||||
@@ -36,6 +36,10 @@ namespace posix_time {
|
||||
}
|
||||
|
||||
inline ptime from_iso_extended_string(const std::string& s) {
|
||||
if (s.size() == 10) { //assume we just have a date which is 10 chars
|
||||
gregorian::date d = gregorian::from_simple_string(s);
|
||||
return ptime( d );
|
||||
}
|
||||
return date_time::parse_delimited_time<ptime>(s, 'T');
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace boost { namespace date_time {
|
||||
//! match() should be called and return value checked.
|
||||
//! \param[in] str the string to check
|
||||
//! \returns false if it is definitely not a special value
|
||||
static bool likely(const string_type& str)
|
||||
static bool should_call_match(const string_type& str)
|
||||
{
|
||||
if (!str.empty()) {
|
||||
switch (str[0]) {
|
||||
|
||||
@@ -481,7 +481,7 @@ namespace date_time {
|
||||
boost::algorithm::replace_all(format, unrestricted_hours_format, hours_str);
|
||||
}
|
||||
// We still have to process restricted hours format specifier. In order to
|
||||
// support parseability of durations in ISO format (%H%M%S), we'll have to
|
||||
// support parseability of durations in ISO 8601 format (%H%M%S), we'll have to
|
||||
// restrict the stringified hours length to 2 characters.
|
||||
if (format.find(hours_format) != string_type::npos) {
|
||||
if (hours_str.empty())
|
||||
|
||||
@@ -30,14 +30,14 @@ namespace date_time {
|
||||
current_ = current_ - offset_;
|
||||
return *this;
|
||||
}
|
||||
time_type operator*() {return current_;}
|
||||
time_type* operator->() {return ¤t_;}
|
||||
bool operator< (const time_type& t) {return current_ < t;}
|
||||
bool operator<= (const time_type& t) {return current_ <= t;}
|
||||
bool operator!= (const time_type& t) {return current_ != t;}
|
||||
bool operator== (const time_type& t) {return current_ == t;}
|
||||
bool operator> (const time_type& t) {return current_ > t;}
|
||||
bool operator>= (const time_type& t) {return current_ >= t;}
|
||||
const time_type& operator*() const {return current_;}
|
||||
const time_type* operator->() const {return ¤t_;}
|
||||
bool operator< (const time_type& t) const {return current_ < t;}
|
||||
bool operator<= (const time_type& t) const {return current_ <= t;}
|
||||
bool operator!= (const time_type& t) const {return current_ != t;}
|
||||
bool operator== (const time_type& t) const {return current_ == t;}
|
||||
bool operator> (const time_type& t) const {return current_ > t;}
|
||||
bool operator>= (const time_type& t) const {return current_ >= t;}
|
||||
|
||||
private:
|
||||
time_type current_;
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace date_time {
|
||||
|
||||
}
|
||||
|
||||
//! Parse time duration part of an iso time of form: [-]hhmmss[.fff...] (eg: 120259.123 is 12 hours, 2 min, 59 seconds, 123000 microseconds)
|
||||
//! Parse time duration part of an ISO 8601 time of form: [-]hhmmss[.fff...] (eg: 120259.123 is 12 hours, 2 min, 59 seconds, 123000 microseconds)
|
||||
template<class time_duration>
|
||||
inline
|
||||
time_duration
|
||||
@@ -309,7 +309,7 @@ namespace date_time {
|
||||
// then from_iso_string should be able to read a special value string
|
||||
// the special_values_parser is expensive to set up and not thread-safe
|
||||
// so it cannot be static, so we need to be careful about when we use it
|
||||
if (svp_type::likely(s)) {
|
||||
if (svp_type::should_call_match(s)) {
|
||||
typedef typename svp_type::stringstream_type ss_type;
|
||||
typedef typename svp_type::stream_itr_type itr_type;
|
||||
typedef typename svp_type::match_results mr_type;
|
||||
|
||||
+2
-1
@@ -12,5 +12,6 @@
|
||||
"maintainers": [
|
||||
"Jeff Garland <jeff -at- crystalclearsoftware.com>",
|
||||
"James E. King III <jking -at- apache.org>"
|
||||
]
|
||||
],
|
||||
"cxxstd": "11"
|
||||
}
|
||||
|
||||
+20
-19
@@ -3,10 +3,12 @@ import path ;
|
||||
import regex ;
|
||||
import testing ;
|
||||
|
||||
project : requirements <library>/boost/date_time//boost_date_time ;
|
||||
|
||||
local DATE_TIME_DYNAMIC_PROPERTIES = <define>BOOST_ALL_DYN_LINK <runtime-link>shared <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG <define>BOOST_ALL_NO_LIB ;
|
||||
local DATE_TIME_PROPERTIES = <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
# FIXME
|
||||
#std::locale-support
|
||||
# FIXME
|
||||
#std::locale-support
|
||||
<define>BOOST_ALL_NO_LIB ;
|
||||
|
||||
# core stuff
|
||||
@@ -43,12 +45,12 @@ run gregorian/testparse_date.cpp ;
|
||||
run gregorian/testperiod.cpp ;
|
||||
|
||||
run gregorian/testgreg_serialize.cpp
|
||||
../../serialization/build//boost_serialization
|
||||
/boost/serialization//boost_serialization
|
||||
: : : <define>DATE_TIME_XML_SERIALIZE
|
||||
: testgreg_serialize_xml ;
|
||||
|
||||
run gregorian/testgreg_serialize.cpp
|
||||
../../serialization/build//boost_serialization
|
||||
/boost/serialization//boost_serialization
|
||||
: : :
|
||||
: testgreg_serialize ;
|
||||
|
||||
@@ -65,7 +67,7 @@ run posix_time/testtime.cpp ;
|
||||
run posix_time/testmicrosec_time_clock.cpp ;
|
||||
run posix_time/testgreg_duration_operators.cpp ;
|
||||
run posix_time/testtime_facet.cpp ;
|
||||
run posix_time/testtime_input_facet.cpp
|
||||
run posix_time/testtime_input_facet.cpp
|
||||
: : : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
: testtime_input_facet ;
|
||||
|
||||
@@ -75,35 +77,35 @@ run posix_time/testtime_formatters.cpp
|
||||
|
||||
# text archive tests
|
||||
run posix_time/testtime_serialize.cpp
|
||||
../../serialization/build//boost_serialization
|
||||
/boost/serialization//boost_serialization
|
||||
: : :
|
||||
: testtime_serialize ;
|
||||
|
||||
run posix_time/testtime_serialize.cpp
|
||||
../../serialization/build//boost_serialization
|
||||
/boost/serialization//boost_serialization
|
||||
: : : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
: testtime_serialize_std_config ;
|
||||
|
||||
# xml archive tests
|
||||
run posix_time/testtime_serialize.cpp
|
||||
../../serialization/build//boost_serialization
|
||||
/boost/serialization//boost_serialization
|
||||
: : : <define>DATE_TIME_XML_SERIALIZE <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
: testtime_serialize_xml_std_config ;
|
||||
|
||||
run posix_time/testtime_serialize.cpp
|
||||
../../serialization/build//boost_serialization
|
||||
/boost/serialization//boost_serialization
|
||||
: : : <define>DATE_TIME_XML_SERIALIZE
|
||||
: testtime_serialize_xml ;
|
||||
|
||||
# versioning tests
|
||||
run posix_time/testtime_serialize_versioning.cpp
|
||||
../../serialization/build//boost_serialization
|
||||
: : testtime_serialize_versioning_prev
|
||||
/boost/serialization//boost_serialization
|
||||
: : testtime_serialize_versioning_prev
|
||||
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
: testtime_serialize_versioning_curr ;
|
||||
|
||||
run posix_time/testtime_serialize_versioning.cpp
|
||||
../../serialization/build//boost_serialization
|
||||
/boost/serialization//boost_serialization
|
||||
: : : <define>BOOST_DATE_TIME_POSIX_TIME_DURATION_VERSION=0
|
||||
: testtime_serialize_versioning_prev ;
|
||||
|
||||
@@ -124,7 +126,7 @@ run local_time/testlocal_time.cpp ;
|
||||
run local_time/testlocal_time_iterator.cpp ;
|
||||
run local_time/testlocal_time_period.cpp ;
|
||||
|
||||
run local_time/testtz_database.cpp
|
||||
run local_time/testtz_database.cpp
|
||||
: : ../data/date_time_zonespec.csv local_time/poorly_formed_zonespec.csv
|
||||
: ;
|
||||
run local_time/testlocal_time_facet.cpp
|
||||
@@ -137,17 +139,16 @@ run local_time/testclocks.cpp ;
|
||||
#{
|
||||
# local DATE_TIME_PROPERTIES = <define>BOOST_ALL_NO_LIB <define>USE_DATE_TIME_PRE_1_33_FACET_IO
|
||||
# # FIXME
|
||||
# # std::locale-support toolset::require-boost-spirit-support
|
||||
# # std::locale-support toolset::require-boost-spirit-support
|
||||
# ;
|
||||
|
||||
# Iterate over all public headers and generate a self-contained header test to check for any missing includes
|
||||
# and basic syntax errors.
|
||||
if ! [ os.environ BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ]
|
||||
{
|
||||
local headers_path = [ path.make $(BOOST_ROOT)/libs/date_time/include/boost ] ;
|
||||
for file in [ path.glob-tree $(headers_path) : *.hpp ]
|
||||
for file in [ glob-tree-ex ../include/boost : *.hpp ]
|
||||
{
|
||||
local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
|
||||
local rel_file = [ path.relative-to ../include/boost $(file) ] ;
|
||||
# Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
|
||||
# All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
|
||||
local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ;
|
||||
@@ -159,8 +160,8 @@ if ! [ os.environ BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ]
|
||||
|
||||
# Copyright (c) 2000-2020
|
||||
# CrystalClear Software, Inc.
|
||||
# Subject to the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or
|
||||
# Subject to the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# Copyright 2021-2024 Alexander Grund
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
project(cmake_subdir_test LANGUAGES CXX)
|
||||
|
||||
# Those 2 should work the same
|
||||
# while using find_package for the installed Boost avoids the need to manually specify dependencies
|
||||
if(BOOST_CI_INSTALL_TEST)
|
||||
find_package(boost_date_time REQUIRED)
|
||||
else()
|
||||
set(BOOST_INCLUDE_LIBRARIES date_time)
|
||||
add_subdirectory(../../../.. deps/boost EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
add_executable(main main.cpp)
|
||||
target_link_libraries(main Boost::date_time)
|
||||
|
||||
enable_testing()
|
||||
add_test(NAME main COMMAND main)
|
||||
@@ -0,0 +1,86 @@
|
||||
/* A simple example for using a custom_time_zone and a posix_time_zone.
|
||||
*/
|
||||
|
||||
#include "boost/date_time/local_time/local_time.hpp"
|
||||
#include <iostream>
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
using namespace boost;
|
||||
using namespace local_time;
|
||||
using namespace gregorian;
|
||||
using posix_time::time_duration;
|
||||
|
||||
/***** custom_time_zone *****/
|
||||
|
||||
// create the dependent objects for a custom_time_zone
|
||||
time_zone_names tzn("Eastern Standard Time", "EST",
|
||||
"Eastern Daylight Time", "EDT");
|
||||
time_duration utc_offset(-5,0,0);
|
||||
dst_adjustment_offsets adj_offsets(time_duration(1,0,0),
|
||||
time_duration(2,0,0),
|
||||
time_duration(2,0,0));
|
||||
// rules for this zone are:
|
||||
// start on first Sunday of April at 2 am
|
||||
// end on last Sunday of October at 2 am
|
||||
// so we use a first_last_dst_rule
|
||||
first_day_of_the_week_in_month start_rule(Sunday, Apr);
|
||||
last_day_of_the_week_in_month end_rule(Sunday, Oct);
|
||||
shared_ptr<dst_calc_rule> nyc_rules(new first_last_dst_rule(start_rule,
|
||||
end_rule));
|
||||
// create more dependent objects for a non-dst custom_time_zone
|
||||
time_zone_names tzn2("Mountain Standard Time", "MST",
|
||||
"", ""); // no dst means empty dst strings
|
||||
time_duration utc_offset2(-7,0,0);
|
||||
dst_adjustment_offsets adj_offsets2(time_duration(0,0,0),
|
||||
time_duration(0,0,0),
|
||||
time_duration(0,0,0));
|
||||
// no dst means we need a null pointer to the rules
|
||||
shared_ptr<dst_calc_rule> phx_rules;
|
||||
|
||||
// create the custom_time_zones
|
||||
time_zone_ptr nyc_1(new custom_time_zone(tzn, utc_offset, adj_offsets, nyc_rules));
|
||||
time_zone_ptr phx_1(new custom_time_zone(tzn2, utc_offset2, adj_offsets2, phx_rules));
|
||||
|
||||
/***** posix_time_zone *****/
|
||||
|
||||
// create posix_time_zones that are the duplicates of the
|
||||
// custom_time_zones created above. See posix_time_zone documentation
|
||||
// for details on full zone names.
|
||||
std::string nyc_string, phx_string;
|
||||
nyc_string = "EST-05:00:00EDT+01:00:00,M4.1.0/02:00:00,M10.5.0/02:00:00";
|
||||
// nyc_string = "EST-05EDT,M4.1.0,M10.5.0"; // shorter when defaults used
|
||||
phx_string = "MST-07"; // no-dst
|
||||
time_zone_ptr nyc_2(new posix_time_zone(nyc_string));
|
||||
time_zone_ptr phx_2(new posix_time_zone(phx_string));
|
||||
|
||||
|
||||
/***** show the sets are equal *****/
|
||||
|
||||
std::cout << "The first zone is in daylight savings from:\n "
|
||||
<< nyc_1->dst_local_start_time(2004) << " through "
|
||||
<< nyc_1->dst_local_end_time(2004) << std::endl;
|
||||
|
||||
std::cout << "The second zone is in daylight savings from:\n "
|
||||
<< nyc_2->dst_local_start_time(2004) << " through "
|
||||
<< nyc_2->dst_local_end_time(2004) << std::endl;
|
||||
|
||||
std::cout << "The third zone (no daylight savings):\n "
|
||||
<< phx_1->std_zone_abbrev() << " and "
|
||||
<< phx_1->base_utc_offset() << std::endl;
|
||||
|
||||
std::cout << "The fourth zone (no daylight savings):\n "
|
||||
<< phx_2->std_zone_abbrev() << " and "
|
||||
<< phx_2->base_utc_offset() << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Copyright 2001-2005: CrystalClear Software, Inc
|
||||
* http://www.crystalclearsoftware.com
|
||||
*
|
||||
* Subject to the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,7 @@ main()
|
||||
std::cout << "Check local time of microsec_clock against second_clock" << std::endl;
|
||||
|
||||
ptime last = microsec_clock::local_time();
|
||||
int max = 30;
|
||||
int max = 5;
|
||||
for (int i=0; i<max; i++)
|
||||
{
|
||||
// Some systems loop too fast so "last is less" tests fail due to
|
||||
@@ -64,6 +64,17 @@ main()
|
||||
ptime t2 = microsec_clock::local_time();
|
||||
std::cout << t2 << std::endl;
|
||||
|
||||
// sometimes on very slow systems (github actions) a long time
|
||||
// can pass between syncing to the next second + 300ms (see previous
|
||||
// function) and asking for t2; therefore if the fractional seconds
|
||||
// of t2 are less than 300ms we skip that test loop assuming it
|
||||
// took too long
|
||||
time_duration t2_tod = t2.time_of_day();
|
||||
if (t2_tod.fractional_seconds() < (t2_tod.ticks_per_second() * 3) / 10) {
|
||||
std::cout << "SKIP :: we had a significant host processing delay" << std::endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
check("check equality of hours "
|
||||
"between second_clock and microsec_clock timestamps",
|
||||
t1.time_of_day().hours() == t2.time_of_day().hours());
|
||||
@@ -90,7 +101,7 @@ main()
|
||||
|
||||
|
||||
std::cout << "Check universal time of microsec_clock against second_clock" << std::endl;
|
||||
max = 10;
|
||||
max = 5;
|
||||
last = microsec_clock::universal_time();
|
||||
for (int i=0; i<max; i++)
|
||||
{
|
||||
@@ -107,6 +118,17 @@ main()
|
||||
ptime t2 = microsec_clock::universal_time();
|
||||
std::cout << t2 << std::endl;
|
||||
|
||||
// sometimes on very slow systems (github actions) a long time
|
||||
// can pass between syncing to the next second + 300ms (see previous
|
||||
// function) and asking for t2; therefore if the fractional seconds
|
||||
// of t2 are less than 300ms we skip that test loop assuming it
|
||||
// took too long
|
||||
time_duration t2_tod = t2.time_of_day();
|
||||
if (t2_tod.fractional_seconds() < (t2_tod.ticks_per_second() * 3) / 10) {
|
||||
std::cout << "SKIP :: we had a significant host processing delay" << std::endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
check("check equality of hours "
|
||||
"between second_clock and microsec_clock timestamps",
|
||||
t1.time_of_day().hours() == t2.time_of_day().hours());
|
||||
|
||||
@@ -220,6 +220,8 @@ main()
|
||||
ptime t27 = from_iso_extended_string(ts10);
|
||||
check("parse iso extended time w/ frac sec (dec only): " + ts10,
|
||||
t27 == ptime(date(1900,12,31),time_duration(23,0,0,0)));
|
||||
|
||||
|
||||
#else
|
||||
std::string ts3("20020120T235859.123456");
|
||||
ptime t20 = from_iso_string(ts3);
|
||||
@@ -260,6 +262,35 @@ main()
|
||||
ptime t27 = from_iso_extended_string(ts10);
|
||||
check("parse iso extended time w/ frac sec (dec only): " + ts10,
|
||||
t27 == ptime(date(1900,12,31),time_duration(23,0,0,0)));
|
||||
|
||||
//the following test cases are for this issue:
|
||||
//https://github.com/boostorg/date_time/issues/187
|
||||
try {
|
||||
std::string ts11("1900-12-31"); //date only string
|
||||
ptime t28 = from_iso_extended_string(ts11);
|
||||
check("parse iso extended time date only): " + ts11,
|
||||
t28 == ptime(date(1900,12,31),time_duration(0,0,0,0)));
|
||||
}
|
||||
catch( std::exception& e )
|
||||
{
|
||||
std::cout << e.what() << std::endl;
|
||||
check("parse iso extended time date only): 1900-12-32", false);
|
||||
}
|
||||
|
||||
try {
|
||||
//expect a date-time exception here
|
||||
std::string ts12("1900-1"); //completely bogus string
|
||||
ptime t29 = from_iso_extended_string(ts12);
|
||||
check("parse iso extended time bad string: " + ts12, false);
|
||||
(void) t29; //supress unused compiler warning, this is never reached
|
||||
}
|
||||
catch( std::exception& e )
|
||||
{
|
||||
//Day of month value is out of range 1..31
|
||||
// std::cout << e.what() << std::endl;
|
||||
check("parse iso extended time date only): 1900-1", true);
|
||||
}
|
||||
|
||||
#endif // BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
|
||||
}
|
||||
|
||||
|
||||
@@ -306,6 +306,18 @@ main()
|
||||
t18 == ptime(date(2032,2,15), time_duration(18,47,14)));
|
||||
check("time_t conversion from 1960483634", to_time_t(t18) == tt3);
|
||||
|
||||
#if !defined(BOOST_NO_INT64_T)
|
||||
// 64-bit time_t test (if running with a 64-bit time_t)
|
||||
if (sizeof(std::time_t) >= 8)
|
||||
{
|
||||
std::time_t tt4(INT64_C(11864480887));
|
||||
t18 = from_time_t(tt4); //2345-12-21 09:08:07
|
||||
check("time_t conversion of 11864480887",
|
||||
t18 == ptime(date(2345,12,21), time_duration(9,8,7)));
|
||||
check("time_t conversion from 11864480887", to_time_t(t18) == tt4);
|
||||
}
|
||||
#endif
|
||||
|
||||
special_values_tests();
|
||||
|
||||
//min and max constructors
|
||||
|
||||
@@ -125,8 +125,8 @@ int main(){
|
||||
check("Contains rep", !zero_len.contains(3));
|
||||
check("Contains period (not)", !zero_len.contains(a_period(5,8)));
|
||||
check("Contains period", p1.contains(zero_len));
|
||||
check("Intersects", zero_len.intersects(p1));
|
||||
check("Intersects", p1.intersects(zero_len));
|
||||
check("Intersects", !zero_len.intersects(p1));
|
||||
check("Intersects", !p1.intersects(zero_len));
|
||||
check("Adjacent", zero_len.is_adjacent(a_period(-10,3)));
|
||||
check("Adjacent", a_period(-10,3).is_adjacent(zero_len));
|
||||
check("Intersection", (zero_len.intersection(p1) == zero_len));
|
||||
@@ -146,8 +146,8 @@ int main(){
|
||||
check("Contains rep in-between (always false)", !null_per.contains(3));
|
||||
check("Contains period (not)", !null_per.contains(a_period(7,9)));
|
||||
check("Contains period", p1.contains(null_per));
|
||||
check("Intersects", null_per.intersects(p1));
|
||||
check("Intersects", p1.intersects(null_per));
|
||||
check("Intersects", !null_per.intersects(p1));
|
||||
check("Intersects", !p1.intersects(null_per));
|
||||
check("Adjacent", null_per.is_adjacent(a_period(-10,5)));
|
||||
check("Adjacent", null_per.is_adjacent(a_period(1,10)));
|
||||
|
||||
|
||||
+24
-24
@@ -1,5 +1,5 @@
|
||||
# Copyright (c) 2002-2006 CrystalClear Software, Inc.
|
||||
# Use, modification and distribution is subject to the
|
||||
# Use, modification and distribution is subject to the
|
||||
# Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
@@ -9,7 +9,7 @@ import set ;
|
||||
using boostbook ;
|
||||
using doxygen ;
|
||||
|
||||
boostbook date_time : date_time.xml
|
||||
boostbook date_time : date_time.xml
|
||||
:
|
||||
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
|
||||
<dependency>date_time_autodoc
|
||||
@@ -21,23 +21,23 @@ boostbook date_time : date_time.xml
|
||||
|
||||
# boostbook date_time_doc : exclusive_date_time.xml ;
|
||||
|
||||
# file lists take the form of [ set.difference [ glob include/these ] : [ glob but/not/these ] ]
|
||||
# file lists take the form of [ set.difference [ glob include/these ] : [ glob but/not/these ] ]
|
||||
|
||||
local date_time_files = [ glob ../../../boost/date_time/*.hpp ] ;
|
||||
local date_time_files = [ glob ../include/boost/date_time/*.hpp ] ;
|
||||
|
||||
# local date_time_files = [ set.difference
|
||||
# [ glob ../../../boost/date_time/*.hpp ] :
|
||||
# [ glob ../../../boost/date_time/testfrmwk.hpp
|
||||
# # ../../../boost/date_time/time_zone_base.hpp
|
||||
# # ../../../boost/date_time/time_zone_names.hpp
|
||||
# # ../../../boost/date_time/tz_db_base.hpp
|
||||
# # ../../../boost/date_time/dst_transition_generators.hpp
|
||||
# ]
|
||||
# local date_time_files = [ set.difference
|
||||
# [ glob ../include/boost/date_time/*.hpp ] :
|
||||
# [ glob ../include/boost/date_time/testfrmwk.hpp
|
||||
# # ../../../boost/date_time/time_zone_base.hpp
|
||||
# # ../../../boost/date_time/time_zone_names.hpp
|
||||
# # ../../../boost/date_time/tz_db_base.hpp
|
||||
# # ../../../boost/date_time/dst_transition_generators.hpp
|
||||
# ]
|
||||
# ] ;
|
||||
|
||||
local gregorian_files = [ set.difference
|
||||
[ glob ../../../boost/date_time/gregorian/*.hpp ] :
|
||||
[ glob ../../../boost/date_time/gregorian/event_schedule.hpp ]
|
||||
local gregorian_files = [ set.difference
|
||||
[ glob ../include/boost/date_time/gregorian/*.hpp ] :
|
||||
[ glob ../include/boost/date_time/gregorian/event_schedule.hpp ]
|
||||
] ;
|
||||
|
||||
#ECHO $(date_time_files) ; # useful for debugging
|
||||
@@ -45,33 +45,33 @@ local gregorian_files = [ set.difference
|
||||
# to build the autodoc files, run bjam --v2 autodoc_target. copy generated
|
||||
# file from bin.v2 dir to here. run ref_tag_fix.pl.
|
||||
|
||||
doxygen date_time_autodoc :
|
||||
$(date_time_files) :
|
||||
<doxygen:param>ENABLE_PREPROCESSING=NO
|
||||
doxygen date_time_autodoc :
|
||||
$(date_time_files) :
|
||||
<doxygen:param>ENABLE_PREPROCESSING=NO
|
||||
<xsl:param>boost.doxygen.reftitle="Date Time Reference"
|
||||
<doxygen.doxproc.title>"Date Time Reference"
|
||||
<doxygen.doxproc.id>"date_time_reference"
|
||||
;
|
||||
|
||||
doxygen gregorian_autodoc :
|
||||
$(gregorian_files) :
|
||||
<doxygen:param>ENABLE_PREPROCESSING=NO
|
||||
$(gregorian_files) :
|
||||
<doxygen:param>ENABLE_PREPROCESSING=NO
|
||||
<xsl:param>boost.doxygen.reftitle="Gregorian Reference"
|
||||
<doxygen.doxproc.title>"Gregorian Reference"
|
||||
<doxygen.doxproc.id>"gregorian_reference"
|
||||
;
|
||||
|
||||
doxygen posix_time_autodoc :
|
||||
[ glob ../../../boost/date_time/posix_time/*.hpp ] :
|
||||
<doxygen:param>ENABLE_PREPROCESSING=NO
|
||||
[ glob ../include/boost/date_time/posix_time/*.hpp ] :
|
||||
<doxygen:param>ENABLE_PREPROCESSING=NO
|
||||
<xsl:param>boost.doxygen.reftitle="Posix Time Reference"
|
||||
<doxygen.doxproc.title>"Posix Time Reference"
|
||||
<doxygen.doxproc.id>"posix_time_reference"
|
||||
;
|
||||
|
||||
doxygen local_time_autodoc :
|
||||
[ glob ../../../boost/date_time/local_time/*.hpp ] :
|
||||
<doxygen:param>ENABLE_PREPROCESSING=NO
|
||||
[ glob ../include/boost/date_time/local_time/*.hpp ] :
|
||||
<doxygen:param>ENABLE_PREPROCESSING=NO
|
||||
<xsl:param>boost.doxygen.reftitle="Local Time Reference"
|
||||
<doxygen.doxproc.title>"Local Time Reference"
|
||||
<doxygen.doxproc.id>"local_time_reference"
|
||||
|
||||
@@ -132,7 +132,7 @@ date d(from_string(ds));</screen></entry>
|
||||
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>date from_undelimited_string(std::string)</screen></entry>
|
||||
<entry>From iso type date string where with order year-month-day eg: 20020125</entry>
|
||||
<entry>From ISO 8601 type date string where with order year-month-day eg: 20020125</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>std::string ds("20020125");
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
us_facet->format("%m/%d/%Y");
|
||||
std::cout << d1 << std::endl; // 10/01/2002
|
||||
|
||||
// English names, iso order (year-month-day), '-' separator
|
||||
// English names, ISO 8601 order (year-month-day), '-' separator
|
||||
us_facet->format("%Y-%b-%d");
|
||||
std::cout << d1 << std::endl; // 2002-Oct-01
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ mar_mst.shift(hours(48));
|
||||
<!-- TODO: the streaming operators have not bee changed from time_period to local_time_period
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>operator<<</screen></entry>
|
||||
<entry>Output streaming operator for time duration. Uses facet to output [date time_of_day/date time_of_day]. The default is format is <code>[YYYY-mmm-DD hh:mm:ss.fffffffff/YYYY-mmm-DD hh:mm:ss.fffffffff]</code> string where <code>mmm</code> is 3 char month name and the fractional seconds are left out when zero.</entry>
|
||||
<entry>Output streaming operator for time duration. Uses facet to output [date time_of_day/date time_of_day]. The default is format is <code>[YYYY-mmm-DD hh:mm:ss.fffffffff/YYYY-mmm-DD hh:mm:ss.fffffffff]</code> string where <code>mmm</code> is 3 char month name and the fractional seconds are only included if non-zero.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>[2002-Jan-01 01:25:10.000000001/ \
|
||||
@@ -337,7 +337,7 @@ mar_mst.shift(hours(48));
|
||||
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>operator>></screen></entry>
|
||||
<entry>Input streaming operator for time duration. Uses facet to read [date time_of_day/date time_of_day]. The default is format is <code>[YYYY-mmm-DD hh:mm:ss.fffffffff/YYYY-mmm-DD hh:mm:ss.fffffffff]</code> string where <code>mmm</code> is 3 char month name and the fractional seconds are left out when zero.</entry>
|
||||
<entry>Input streaming operator for time duration. Uses facet to read [date time_of_day/date time_of_day]. The default is format is <code>[YYYY-mmm-DD hh:mm:ss.fffffffff/YYYY-mmm-DD hh:mm:ss.fffffffff]</code> string where <code>mmm</code> is 3 char month name and the fractional seconds are only included if non-zero.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>[2002-Jan-01 01:25:10.000000001/ \
|
||||
|
||||
@@ -127,7 +127,7 @@ ptime t(time_from_string(ts))</screen></entry>
|
||||
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>ptime from_iso_string(std::string)</screen></entry>
|
||||
<entry>From non delimited iso form string.</entry>
|
||||
<entry>From non delimited ISO 8601 form string.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>std::string ts("20020131T235959");
|
||||
@@ -136,7 +136,7 @@ ptime t(from_iso_string(ts))</screen></entry>
|
||||
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>ptime from_iso_extended_string(std::string)</screen></entry>
|
||||
<entry>From delimited iso form string.</entry>
|
||||
<entry>From delimited ISO 8601 form string.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>std::string ts("2020-01-31T23:59:59.123");
|
||||
@@ -345,7 +345,7 @@ pt3.is_special(); // --> false</screen></entry>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>std::string to_simple_string(ptime)</screen></entry>
|
||||
<entry>To <code>YYYY-mmm-DD HH:MM:SS.fffffffff</code> string where <code>mmm</code> 3 char month name. Fractional seconds only included if non-zero.</entry>
|
||||
<entry>To <code>YYYY-mmm-DD HH:MM:SS.fffffffff</code> string where <code>mmm</code> 3 char month name and the fractional seconds are only included if non-zero.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>2002-Jan-01 10:00:01.123456789</screen></entry>
|
||||
@@ -353,18 +353,18 @@ pt3.is_special(); // --> false</screen></entry>
|
||||
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>std::string to_iso_string(ptime)</screen></entry>
|
||||
<entry>Convert to form <code>YYYYMMDDTHHMMSS,fffffffff</code> where <code>T</code> is the date-time separator</entry>
|
||||
<entry>Convert to form <code>YYYYMMDDTHHMMSS.fffffffff</code> where <code>T</code> is the date-time separator and the fractional seconds are only included if non-zero.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>20020131T100001,123456789</screen></entry>
|
||||
<entry><screen>20020131T100001.123456789</screen></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>std::string to_iso_extended_string(ptime)</screen></entry>
|
||||
<entry>Convert to form <code>YYYY-MM-DDTHH:MM:SS,fffffffff</code> where <code>T</code> is the date-time separator</entry>
|
||||
<entry>Convert to form <code>YYYY-MM-DDTHH:MM:SS.fffffffff</code> where <code>T</code> is the date-time separator and the fractional seconds are only included if non-zero.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>2002-01-31T10:00:01,123456789</screen></entry>
|
||||
<entry><screen>2002-01-31T10:00:01.123456789</screen></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
|
||||
@@ -479,7 +479,7 @@ td3.is_special(); // --> false</screen></entry>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>std::string to_simple_string(time_duration)</screen></entry>
|
||||
<entry>To <code>HH:MM:SS.fffffffff</code> were <code>fff</code> is fractional seconds that are only included if non-zero.</entry>
|
||||
<entry>To <code>HH:MM:SS.fffffffff</code> where <code>fffffffff</code> is fractional seconds that are only included if non-zero.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>10:00:01.123456789</screen></entry>
|
||||
@@ -487,10 +487,10 @@ td3.is_special(); // --> false</screen></entry>
|
||||
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>std::string to_iso_string(time_duration)</screen></entry>
|
||||
<entry>Convert to form <code>HHMMSS,fffffffff</code>.</entry>
|
||||
<entry>Convert to form <code>HHMMSS.fffffffff</code> where the fractional seconds are only included if non-zero.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>100001,123456789</screen></entry>
|
||||
<entry><screen>100001.123456789</screen></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
|
||||
@@ -191,7 +191,7 @@ tp.last();// --> 2002-Jan-01 09:59:59.999999999</screen>
|
||||
ptime t1(d, seconds(10)); //10 sec after midnight
|
||||
ptime t2(d, hours(10)); //10 hours after midnight
|
||||
time_period tp(t1, t2);
|
||||
tp.last(); // --> 2002-Jan-01 10:00:00</screen>
|
||||
tp.end(); // --> 2002-Jan-01 10:00:00</screen>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
@@ -311,7 +311,7 @@ tp2.intersects(tp1); // --> true</screen>
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>std::string
|
||||
to_simple_string(time_period dp)</screen></entry>
|
||||
<entry>To <code>[YYYY-mmm-DD hh:mm:ss.fffffffff/YYYY-mmm-DD hh:mm:ss.fffffffff]</code> string where <code>mmm</code> is 3 char month name.</entry>
|
||||
<entry>To <code>[YYYY-mmm-DD hh:mm:ss.fffffffff/YYYY-mmm-DD hh:mm:ss.fffffffff]</code> string where <code>mmm</code> is 3 char month name and the fractional seconds are only included if non-zero.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>[2002-Jan-01 01:25:10.000000001/
|
||||
@@ -341,7 +341,7 @@ tp2.intersects(tp1); // --> true</screen>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>operator<<</screen></entry>
|
||||
<entry>Output streaming operator for time duration. Uses facet to output [date time_of_day/date time_of_day]. The default is format is <code>[YYYY-mmm-DD hh:mm:ss.fffffffff/YYYY-mmm-DD hh:mm:ss.fffffffff]</code> string where <code>mmm</code> is 3 char month name and the fractional seconds are left out when zero.</entry>
|
||||
<entry>Output streaming operator for time duration. Uses facet to output [date time_of_day/date time_of_day]. The default is format is <code>[YYYY-mmm-DD hh:mm:ss.fffffffff/YYYY-mmm-DD hh:mm:ss.fffffffff]</code> string where <code>mmm</code> is 3 char month name and the fractional seconds are only included if non-zero.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>[2002-Jan-01 01:25:10.000000001/ \
|
||||
@@ -350,7 +350,7 @@ tp2.intersects(tp1); // --> true</screen>
|
||||
|
||||
<row>
|
||||
<entry valign="top" morerows="1"><screen>operator>></screen></entry>
|
||||
<entry>Input streaming operator for time duration. Uses facet to read [date time_of_day/date time_of_day]. The default is format is <code>[YYYY-mmm-DD hh:mm:ss.fffffffff/YYYY-mmm-DD hh:mm:ss.fffffffff]</code> string where <code>mmm</code> is 3 char month name and the fractional seconds are left out when zero.</entry>
|
||||
<entry>Input streaming operator for time duration. Uses facet to read [date time_of_day/date time_of_day]. The default is format is <code>[YYYY-mmm-DD hh:mm:ss.fffffffff/YYYY-mmm-DD hh:mm:ss.fffffffff]</code> string where <code>mmm</code> is 3 char month name and the fractional seconds are only included if non-zero.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>[2002-Jan-01 01:25:10.000000001/ \
|
||||
|
||||
Reference in New Issue
Block a user