1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-14 01:57:59 -05:00

Initial commit

This commit is contained in:
Crimson-Hawk
2024-03-05 16:42:40 +08:00
commit f1e4595ebf
39576 changed files with 7006612 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
set(VCPKG_DETECTED_CMAKE_CROSSCOMPILING "OFF")
set(VCPKG_DETECTED_CMAKE_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_SIZEOF_VOID_P "8")
set(VCPKG_DETECTED_MSVC "1")
set(VCPKG_DETECTED_MSVC_VERSION "1929")
set(VCPKG_DETECTED_CMAKE_AR "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/lib.exe")
set(VCPKG_DETECTED_CMAKE_RANLIB ":")
set(VCPKG_DETECTED_CMAKE_STRIP "")
set(VCPKG_DETECTED_CMAKE_NM "")
set(VCPKG_DETECTED_CMAKE_OBJDUMP "")
set(VCPKG_DETECTED_CMAKE_DLLTOOL "")
set(VCPKG_DETECTED_CMAKE_MT "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/mt.exe")
set(VCPKG_DETECTED_CMAKE_LINKER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/link.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/rc.exe")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER_ID "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_C_STANDARD "")
set(VCPKG_DETECTED_CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17")
set(VCPKG_DETECTED_CMAKE_C_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD "")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
set(VCPKG_DETECTED_CMAKE_CXX_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_C_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ")
set(VCPKG_DETECTED_CMAKE_CXX_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ")
set(VCPKG_DETECTED_CMAKE_RC_FLAGS "-c65001 /DWIN32")
set(VCPKG_DETECTED_CMAKE_SHARED_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_EXE_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_ENV_PATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE//Extensions/Microsoft/IntelliCode/CLI;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/VCPackages;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/bin/Roslyn;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019//x64;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/;C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/;C:/Program Files (x86)/HTML Help Workshop;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/devinit;C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64;C:/Program Files (x86)/Windows Kits/10/bin/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise//MSBuild/Current/Bin;C:/Windows/Microsoft.NET/Framework64/v4.0.30319;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/;C:/Program Files/PowerShell/7;C:/Windows/system32;C:/Windows;C:/Windows/system32/Wbem;C:/Windows/system32/WindowsPowerShell/v1.0/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/x64/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/Linux/bin/ConnectionManagerExe;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja")
set(VCPKG_DETECTED_ENV_INCLUDE "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/include;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/include;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/include/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/ucrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/shared;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/winrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/cppwinrt")
set(VCPKG_DETECTED_ENV_C_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_CPLUS_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_LIB "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/lib/um/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/ucrt/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/um/x64")
set(VCPKG_DETECTED_ENV_LIBPATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x86/store/references;C:/Program Files (x86)/Windows Kits/10/UnionMetadata/10.0.22000.0;C:/Program Files (x86)/Windows Kits/10/References/10.0.22000.0;C:/Windows/Microsoft.NET/Framework64/v4.0.30319")
set(VCPKG_DETECTED_ENV_LIBRARY_PATH "")
set(VCPKG_DETECTED_ENV_LD_LIBRARY_PATH "")
set(VCPKG_COMBINED_CXX_FLAGS_DEBUG " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 ")
set(VCPKG_COMBINED_C_FLAGS_DEBUG " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 ")
set(VCPKG_COMBINED_SHARED_LINKER_FLAGS_DEBUG "-machine:x64 -nologo -debug -INCREMENTAL ")
set(VCPKG_COMBINED_EXE_LINKER_FLAGS_DEBUG "-machine:x64 -nologo -debug -INCREMENTAL ")
set(VCPKG_COMBINED_STATIC_LINKER_FLAGS_DEBUG "-machine:x64 -nologo")
set(VCPKG_COMBINED_RC_FLAGS_DEBUG "-c65001 -DWIN32 -D_DEBUG")

View File

@@ -0,0 +1,50 @@
[1/2] cmd /c "cd ../../x64-windows-dbg && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/vcpkg-cmake-get-vars/cmake_get_vars" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-date-time_x64-windows/debug" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-DVCPKG_OUTPUT_FILE:PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/cmake-get-vars-x64-windows-dbg.cmake.log""
-- The C compiler identification is MSVC 19.29.30146.0
-- The CXX compiler identification is MSVC 19.29.30146.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg
[2/2] cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/vcpkg-cmake-get-vars/cmake_get_vars" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-date-time_x64-windows" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-DVCPKG_OUTPUT_FILE:PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/cmake-get-vars-x64-windows-rel.cmake.log""
-- The C compiler identification is MSVC 19.29.30146.0
-- The CXX compiler identification is MSVC 19.29.30146.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel

View File

@@ -0,0 +1,52 @@
set(VCPKG_DETECTED_CMAKE_CROSSCOMPILING "OFF")
set(VCPKG_DETECTED_CMAKE_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_SIZEOF_VOID_P "8")
set(VCPKG_DETECTED_MSVC "1")
set(VCPKG_DETECTED_MSVC_VERSION "1929")
set(VCPKG_DETECTED_CMAKE_AR "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/lib.exe")
set(VCPKG_DETECTED_CMAKE_RANLIB ":")
set(VCPKG_DETECTED_CMAKE_STRIP "")
set(VCPKG_DETECTED_CMAKE_NM "")
set(VCPKG_DETECTED_CMAKE_OBJDUMP "")
set(VCPKG_DETECTED_CMAKE_DLLTOOL "")
set(VCPKG_DETECTED_CMAKE_MT "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/mt.exe")
set(VCPKG_DETECTED_CMAKE_LINKER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/link.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/rc.exe")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER_ID "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_C_STANDARD "")
set(VCPKG_DETECTED_CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17")
set(VCPKG_DETECTED_CMAKE_C_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD "")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
set(VCPKG_DETECTED_CMAKE_CXX_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_C_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ")
set(VCPKG_DETECTED_CMAKE_CXX_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ")
set(VCPKG_DETECTED_CMAKE_RC_FLAGS "-c65001 /DWIN32")
set(VCPKG_DETECTED_CMAKE_SHARED_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_EXE_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_ENV_PATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE//Extensions/Microsoft/IntelliCode/CLI;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/VCPackages;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/bin/Roslyn;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019//x64;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/;C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/;C:/Program Files (x86)/HTML Help Workshop;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/devinit;C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64;C:/Program Files (x86)/Windows Kits/10/bin/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise//MSBuild/Current/Bin;C:/Windows/Microsoft.NET/Framework64/v4.0.30319;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/;C:/Program Files/PowerShell/7;C:/Windows/system32;C:/Windows;C:/Windows/system32/Wbem;C:/Windows/system32/WindowsPowerShell/v1.0/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/x64/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/Linux/bin/ConnectionManagerExe;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja")
set(VCPKG_DETECTED_ENV_INCLUDE "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/include;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/include;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/include/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/ucrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/shared;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/winrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/cppwinrt")
set(VCPKG_DETECTED_ENV_C_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_CPLUS_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_LIB "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/lib/um/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/ucrt/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/um/x64")
set(VCPKG_DETECTED_ENV_LIBPATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x86/store/references;C:/Program Files (x86)/Windows Kits/10/UnionMetadata/10.0.22000.0;C:/Program Files (x86)/Windows Kits/10/References/10.0.22000.0;C:/Windows/Microsoft.NET/Framework64/v4.0.30319")
set(VCPKG_DETECTED_ENV_LIBRARY_PATH "")
set(VCPKG_DETECTED_ENV_LD_LIBRARY_PATH "")
set(VCPKG_COMBINED_CXX_FLAGS_RELEASE " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 ")
set(VCPKG_COMBINED_C_FLAGS_RELEASE " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 ")
set(VCPKG_COMBINED_SHARED_LINKER_FLAGS_RELEASE "-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF ")
set(VCPKG_COMBINED_EXE_LINKER_FLAGS_RELEASE "-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF ")
set(VCPKG_COMBINED_STATIC_LINKER_FLAGS_RELEASE "-machine:x64 -nologo")
set(VCPKG_COMBINED_RC_FLAGS_RELEASE "-c65001 -DWIN32 ")

View File

@@ -0,0 +1,2 @@
include("${CMAKE_CURRENT_LIST_DIR}/cmake-get-vars-x64-windows-rel.cmake.log")
include("${CMAKE_CURRENT_LIST_DIR}/cmake-get-vars-x64-windows-dbg.cmake.log")

View File

@@ -0,0 +1,26 @@
[1/2] cmd /c "cd ../../x64-windows-dbg && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-date-time_x64-windows/debug" "-DPORT=boost-date-time" "-DFEATURES=core" "-DWITH_PYTHON2=OFF" "-DWITH_PYTHON3=OFF" "-DCURRENT_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed/x64-windows" "-DB2_EXE=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/b2.exe" "-DSOURCE_PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/src/ost-1.79.0-9fad9b1c7d.clean" "-DBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_CMAKE_VARS_FILE=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/cmake-get-vars-x64-windows.cmake.log" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF""
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
FEATURES
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg
[2/2] cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-date-time_x64-windows" "-DPORT=boost-date-time" "-DFEATURES=core" "-DWITH_PYTHON2=OFF" "-DWITH_PYTHON3=OFF" "-DCURRENT_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed/x64-windows" "-DB2_EXE=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/b2.exe" "-DSOURCE_PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/src/ost-1.79.0-9fad9b1c7d.clean" "-DBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_CMAKE_VARS_FILE=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/cmake-get-vars-x64-windows.cmake.log" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF""
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
FEATURES
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel

View File

View File

View File

@@ -0,0 +1,238 @@
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build && D:\a\1\s\build\vcpkg_installed\x64-windows\tools\boost-build\b2.exe toolset=msvc --user-config=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/user-config.jam --stagedir=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/stage --build-dir=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg runtime-link=shared link=shared address-model=64 architecture=x86 target-os=windows threadapi=win32 variant=debug --disable-icu --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -j2 -sBOOST_ROOT=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build -sBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build --debug-configuration --debug-building --debug-generators --ignore-site-config --hash -q debug-symbols=on -d +2 threading=multi stage"
notice: found boost-build.jam at D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/boost-build.jam
notice: loading B2 from D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/src/kernel/bootstrap.jam
notice: Site configuration files will be ignored due to the
notice: --ignore-site-config command-line option.
notice: Loading explicitly specified user configuration file:
D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\user-config.jam
notice: Searching 'D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg'.
notice: [msvc-cfg] msvc-14.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe'
notice: [msvc-cfg] msvc-14.2 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\arm\cl.exe'
notice: will use 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe' for msvc, condition <toolset>msvc-142
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm64'
Building target '../build/stage'
Build request: object(property-set)@374 <address-model>64 <architecture>x86 <debug-symbols>on <link>shared <runtime-link>shared <target-os>windows <threadapi>win32 <threading>multi <toolset>msvc <variant>debug
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <hardcode-dll-paths>false <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <link>shared:<define>BOOST_ALL_DYN_LINK=1 <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/stage/lib <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <toolset>msvc,<runtime-link>shared:<threading>multi <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>.stage-translate-path
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>.stage-translate-path <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Building target '../build/boost_date_time'
Build request: object(property-set)@381 <address-model>64 <architecture>x86 <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <inlining>off <link>shared <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <link>shared:<define>BOOST_ALL_DYN_LINK=1 <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <toolset>msvc,<runtime-link>shared:<threading>multi
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Usage requirements for boost_date_time:
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
*** construct LIB
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= LIB property-set=
trying type LIB
there are generators for this type
trying generator builtin.lib-generator ( -> LIB )
is viable
trying generator builtin.prebuilt ( -> LIB )
*** 1 viable generators
*** construct SHARED_LIB
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= SHARED_LIB property-set=
trying type SHARED_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB )
*** 1 viable generators
** generator msvc.link.dll
composing: true
*** construct OBJ
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= OBJ property-set=
trying type OBJ
there are generators for this type
trying generator rc.compile.resource ( RC -> OBJ )
is viable
trying generator msvc.compile.c++ ( CPP -> OBJ )
is viable
trying generator msvc.compile.c ( C -> OBJ )
is viable
trying generator msvc.compile.rc ( RC -> OBJ )
is viable
trying generator msvc.compile.asm ( ASM -> OBJ )
is viable
trying generator msvc.compile.c.pch ( H -> C_PCH OBJ )
is viable
trying generator msvc.compile.c++.pch ( H -> CPP_PCH OBJ )
is viable
*** 6 viable generators
** generator msvc.compile.c++
composing:
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } }
generator msvc.compile.c++ spawned
{ msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ]
** generator 'msvc.compile.c' pruned
** generator 'msvc.compile.rc' pruned
** generator 'msvc.compile.asm' pruned
** generator 'msvc.compile.c.pch' pruned
** generator 'msvc.compile.c++.pch' pruned
*** construct SEARCHED_LIB
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= SEARCHED_LIB property-set=
trying type SEARCHED_LIB
there are generators for this type
trying generator searched-lib-generator ( -> SEARCHED_LIB )
is viable
*** 1 viable generators
returned
generator searched-lib-generator spawned
*** construct STATIC_LIB
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= STATIC_LIB property-set=
trying type STATIC_LIB
there are generators for this type
trying generator msvc.archive ( OBJ -> STATIC_LIB )
is viable
*** 1 viable generators
** generator msvc.archive
composing: true
returned
generator msvc.archive spawned
*** construct IMPORT_LIB
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= IMPORT_LIB property-set=
trying type IMPORT_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
generator msvc.link.dll is active, discaring
*** 0 viable generators
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>find-shared-library <relevant>find-static-library <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>response-file <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>toolset <relevant>toolset-msvc:version <relevant>user-interface <relevant>windows-api ] { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ] { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
generator msvc.link.dll spawned
{ msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ]
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ] { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
generator builtin.lib-generator spawned
{ msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ]
Usage requirements from boost_date_time: <define>BOOST_DATE_TIME_DYN_LINK=1 <define>DATE_TIME_INLINE <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
Usage requirements for stage: <define>BOOST_DATE_TIME_DYN_LINK=1 <define>DATE_TIME_INLINE <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>BOOST_DATE_TIME_DYN_LINK=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>.stage-translate-path <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
*** construct INSTALLED_SHARED_LIB
from { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/stage/lib <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= INSTALLED_SHARED_LIB property-set= msvc-142/debug/address-model-64/architecture-x86/threading-multi
trying type INSTALLED_SHARED_LIB
there are generators for this type
trying generator install-shared-lib ( SHARED_LIB -> INSTALLED_SHARED_LIB )
is viable
*** 1 viable generators
returned { common%common.copy-boost_date_time-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } }
generator install-shared-lib spawned
{ common%common.copy-boost_date_time-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_date_time-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } }
with usage requirements: [ ]
Usage requirements from stage: <define>BOOST_DATE_TIME_DYN_LINK=1 <define>DATE_TIME_INLINE <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage\lib
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage\lib\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage\lib"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\gregorian
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\gregorian\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\gregorian"
msvc.read-setup <pD:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18>msvc-setup.read
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18"
file C:\Users\VssAdministrator\AppData\Local\Temp\jam490b005.000
msvc.write-setup-script D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat
type "C:\Users\VssAdministrator\AppData\Local\Temp\jam490b005.000" > "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat"
compile-c-c++ D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\gregorian\greg_month.obj
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
cl "..\src\gregorian\greg_month.cpp" -c -Fo"D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\gregorian\greg_month.obj" -TP /wd4675 /EHs /GR /Zc:throwingNew -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 /Z7 /Od /Ob0 /W3 /MDd /Zc:forScope /Zc:wchar_t /Zc:inline /favor:blend -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE "-I..\include" "-ID:\a\1\s\build\vcpkg_installed\x64-windows\include"
greg_month.cpp
msvc.link.dll D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.dll
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
link /NOLOGO /INCREMENTAL:NO "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\gregorian\greg_month.obj" /DEBUG -machine:x64 -nologo -debug -INCREMENTAL /MACHINE:X64 /MANIFEST:EMBED /subsystem:console /out:"D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.dll" /DLL /IMPLIB:"D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.lib"
Creating library D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.lib and object D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.exp
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage\lib\boost_date_time-vc142-mt-gd-x64-1_79.dll
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.dll" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage\lib\boost_date_time-vc142-mt-gd-x64-1_79.dll"
D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.dll
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage\lib\boost_date_time-vc142-mt-gd-x64-1_79.lib
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.lib" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage\lib\boost_date_time-vc142-mt-gd-x64-1_79.lib"
D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.lib
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage\lib\boost_date_time-vc142-mt-gd-x64-1_79.pdb
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.pdb" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\stage\lib\boost_date_time-vc142-mt-gd-x64-1_79.pdb"
D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_date_time-vc142-mt-gd-x64-1_79.pdb
1 file(s) copied.
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-dbg && "C:\Program Files\CMake\bin\cmake.exe" -P cmake_install.cmake"
-- Install configuration: "Debug"
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-date-time_x64-windows/debug/lib/boost_date_time-vc142-mt-gd-x64-1_79.lib
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-date-time_x64-windows/debug/bin/boost_date_time-vc142-mt-gd-x64-1_79.dll

View File

@@ -0,0 +1,238 @@
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build && D:\a\1\s\build\vcpkg_installed\x64-windows\tools\boost-build\b2.exe toolset=msvc --user-config=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/user-config.jam --stagedir=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/stage --build-dir=D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel runtime-link=shared link=shared address-model=64 architecture=x86 target-os=windows threadapi=win32 variant=release --disable-icu --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -j2 -sBOOST_ROOT=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build -sBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build --debug-configuration --debug-building --debug-generators --ignore-site-config --hash -q debug-symbols=on -d +2 threading=multi stage"
notice: found boost-build.jam at D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/boost-build.jam
notice: loading B2 from D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/src/kernel/bootstrap.jam
notice: Site configuration files will be ignored due to the
notice: --ignore-site-config command-line option.
notice: Loading explicitly specified user configuration file:
D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\user-config.jam
notice: Searching 'D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel'.
notice: [msvc-cfg] msvc-14.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe'
notice: [msvc-cfg] msvc-14.2 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\arm\cl.exe'
notice: will use 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe' for msvc, condition <toolset>msvc-142
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm64'
Building target '../build/stage'
Build request: object(property-set)@374 <address-model>64 <architecture>x86 <debug-symbols>on <link>shared <runtime-link>shared <target-os>windows <threadapi>win32 <threading>multi <toolset>msvc <variant>release
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <hardcode-dll-paths>false <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <link>shared:<define>BOOST_ALL_DYN_LINK=1 <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/stage/lib <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <toolset>msvc,<runtime-link>shared:<threading>multi <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>.stage-translate-path
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>.stage-translate-path <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Building target '../build/boost_date_time'
Build request: object(property-set)@381 <address-model>64 <architecture>x86 <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <inlining>full <link>shared <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <link>shared:<define>BOOST_ALL_DYN_LINK=1 <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <toolset>msvc,<runtime-link>shared:<threading>multi
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
Usage requirements for boost_date_time:
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
*** construct LIB
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= LIB property-set=
trying type LIB
there are generators for this type
trying generator builtin.lib-generator ( -> LIB )
is viable
trying generator builtin.prebuilt ( -> LIB )
*** 1 viable generators
*** construct SHARED_LIB
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= SHARED_LIB property-set=
trying type SHARED_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB )
*** 1 viable generators
** generator msvc.link.dll
composing: true
*** construct OBJ
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= OBJ property-set=
trying type OBJ
there are generators for this type
trying generator rc.compile.resource ( RC -> OBJ )
is viable
trying generator msvc.compile.c++ ( CPP -> OBJ )
is viable
trying generator msvc.compile.c ( C -> OBJ )
is viable
trying generator msvc.compile.rc ( RC -> OBJ )
is viable
trying generator msvc.compile.asm ( ASM -> OBJ )
is viable
trying generator msvc.compile.c.pch ( H -> C_PCH OBJ )
is viable
trying generator msvc.compile.c++.pch ( H -> CPP_PCH OBJ )
is viable
*** 6 viable generators
** generator msvc.compile.c++
composing:
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } }
generator msvc.compile.c++ spawned
{ msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ]
** generator 'msvc.compile.c' pruned
** generator 'msvc.compile.rc' pruned
** generator 'msvc.compile.asm' pruned
** generator 'msvc.compile.c.pch' pruned
** generator 'msvc.compile.c++.pch' pruned
*** construct SEARCHED_LIB
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= SEARCHED_LIB property-set=
trying type SEARCHED_LIB
there are generators for this type
trying generator searched-lib-generator ( -> SEARCHED_LIB )
is viable
*** 1 viable generators
returned
generator searched-lib-generator spawned
*** construct STATIC_LIB
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= STATIC_LIB property-set=
trying type STATIC_LIB
there are generators for this type
trying generator msvc.archive ( OBJ -> STATIC_LIB )
is viable
*** 1 viable generators
** generator msvc.archive
composing: true
returned
generator msvc.archive spawned
*** construct IMPORT_LIB
from { gregorian/greg_month.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>define:<relevant>link <relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= IMPORT_LIB property-set=
trying type IMPORT_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
generator msvc.link.dll is active, discaring
*** 0 viable generators
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>find-shared-library <relevant>find-static-library <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>response-file <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>toolset <relevant>toolset-msvc:version <relevant>user-interface <relevant>windows-api ] { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ] { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
generator msvc.link.dll spawned
{ msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ]
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ] { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
generator builtin.lib-generator spawned
{ msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ]
Usage requirements from boost_date_time: <define>BOOST_DATE_TIME_DYN_LINK=1 <define>DATE_TIME_INLINE <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
Usage requirements for stage: <define>BOOST_DATE_TIME_DYN_LINK=1 <define>DATE_TIME_INLINE <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>BOOST_DATE_TIME_DYN_LINK=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\src\ost-1.79.0-9fad9b1c7d.clean\build>.stage-translate-path <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
*** construct INSTALLED_SHARED_LIB
from { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>DATE_TIME_INLINE <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/stage/lib <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
find-viable-generators target-type= INSTALLED_SHARED_LIB property-set= msvc-142/release/address-model-64/architecture-x86/debug-symbols-on/threading-multi
trying type INSTALLED_SHARED_LIB
there are generators for this type
trying generator install-shared-lib ( SHARED_LIB -> INSTALLED_SHARED_LIB )
is viable
*** 1 viable generators
returned { common%common.copy-boost_date_time-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } }
generator install-shared-lib spawned
{ common%common.copy-boost_date_time-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_date_time-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-gregorian\greg_month.obj.OBJ { gregorian/greg_month.cpp.CPP } } } }
with usage requirements: [ ]
Usage requirements from stage: <define>BOOST_DATE_TIME_DYN_LINK=1 <define>DATE_TIME_INLINE <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-date-time/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage\lib
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage\lib\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage\lib"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\gregorian
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\gregorian\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\gregorian"
msvc.read-setup <pD:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18>msvc-setup.read
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18"
file C:\Users\VssAdministrator\AppData\Local\Temp\jam1108b005.000
msvc.write-setup-script D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat
type "C:\Users\VssAdministrator\AppData\Local\Temp\jam1108b005.000" > "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat"
compile-c-c++ D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\gregorian\greg_month.obj
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
cl "..\src\gregorian\greg_month.cpp" -c -Fo"D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\gregorian\greg_month.obj" -TP /wd4675 /EHs /GR /Zc:throwingNew -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 /O2 /Z7 /Ob2 /W3 /MD /Zc:forScope /Zc:wchar_t /Zc:inline /Gw /favor:blend -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG "-I..\include" "-ID:\a\1\s\build\vcpkg_installed\x64-windows\include"
greg_month.cpp
msvc.link.dll D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.dll
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
link /NOLOGO /INCREMENTAL:NO "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\gregorian\greg_month.obj" /DEBUG -machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF /MACHINE:X64 /MANIFEST:EMBED /OPT:REF,ICF /subsystem:console /out:"D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.dll" /DLL /IMPLIB:"D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.lib"
Creating library D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.lib and object D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.exp
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage\lib\boost_date_time-vc142-mt-x64-1_79.dll
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.dll" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage\lib\boost_date_time-vc142-mt-x64-1_79.dll"
D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.dll
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage\lib\boost_date_time-vc142-mt-x64-1_79.lib
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.lib" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage\lib\boost_date_time-vc142-mt-x64-1_79.lib"
D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.lib
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage\lib\boost_date_time-vc142-mt-x64-1_79.pdb
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.pdb" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\stage\lib\boost_date_time-vc142-mt-x64-1_79.pdb"
D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_date_time-vc142-mt-x64-1_79.pdb
1 file(s) copied.
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-date-time\x64-windows-rel && "C:\Program Files\CMake\bin\cmake.exe" -P cmake_install.cmake"
-- Install configuration: "Release"
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-date-time_x64-windows/lib/boost_date_time-vc142-mt-x64-1_79.lib
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-date-time_x64-windows/bin/boost_date_time-vc142-mt-x64-1_79.dll

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,42 @@
# Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE.txt)
#
# Copyright Rene Rivera 2020.
# For Drone CI we use the Starlark scripting language to reduce duplication.
# As the yaml syntax for Drone CI is rather limited.
#
#
globalenv={'B2_VARIANT': 'variant=release'}
linuxglobalimage="cppalliance/droneubuntu1604:1"
windowsglobalimage="cppalliance/dronevs2019"
def main(ctx):
return [
linux_cxx("B2_TOOLSET=gcc-4.8 B2_CXXSTD=03,11 BOOST_DATE Job 0", "g++-4.8", packages="g++-4.8", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1404:1", environment={'B2_TOOLSET': 'gcc-4.8', 'B2_CXXSTD': '03,11', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=gcc-4.9 B2_CXXSTD=03,11 BOOST_DATE Job 1", "g++-4.9", packages="g++-4.9", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1404:1", environment={'B2_TOOLSET': 'gcc-4.9', 'B2_CXXSTD': '03,11', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=gcc-5 B2_CXXSTD=03,11 Job 2", "g++-5", packages="g++-5", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-5', 'B2_CXXSTD': '03,11', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=gcc-6 B2_CXXSTD=11,14 BOOST_DATE_T Job 3", "g++-6", packages="g++-6", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-6', 'B2_CXXSTD': '11,14', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=gcc-7 B2_CXXSTD=14,17 BOOST_DATE_T Job 4", "g++-7", packages="g++-7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-7', 'B2_CXXSTD': '14,17', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=gcc-8 B2_CXXSTD=17,2a BOOST_DATE_T Job 5", "g++-8", packages="g++-8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-8', 'B2_CXXSTD': '17,2a', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=gcc-9 B2_CXXSTD=17,2a BOOST_DATE_T Job 6", "g++-9", packages="g++-9", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-9', 'B2_CXXSTD': '17,2a', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=clang-3.8 B2_CXXSTD=03,11 BOOST_DA Job 7", "clang++-3.8", packages="clang-3.8 libstdc++-6-dev", llvm_os="xenial", llvm_ver="3.8", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1404:1", environment={'B2_TOOLSET': 'clang-3.8', 'B2_CXXSTD': '03,11', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=clang-4.0 B2_CXXSTD=11,14 BOOST_DA Job 8", "clang++-4.0", packages="clang-4.0 libstdc++-6-dev", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-4.0', 'B2_CXXSTD': '11,14', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=clang-5.0 B2_CXXSTD=11,14 BOOST_DA Job 9", "clang++-5.0", packages="clang-5.0 libstdc++-7-dev", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-5.0', 'B2_CXXSTD': '11,14', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=clang-6.0 B2_CXXSTD=14,17 BOOST_DA Job 10", "clang++-6.0", packages="clang-6.0 libc6-dbg libc++-dev libstdc++-8-dev", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-6.0', 'B2_CXXSTD': '14,17', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=clang-7 B2_CXXSTD=17,2a BOOST_DATE Job 11", "clang++-7", packages="clang-7 libc6-dbg libc++-dev libstdc++-8-dev", llvm_os="xenial", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-7', 'B2_CXXSTD': '17,2a', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=clang-8 B2_CXXSTD=17,2a BOOST_DATE Job 12", "clang++-8", packages="clang-8 libc6-dbg libc++-dev libstdc++-8-dev", llvm_os="xenial", llvm_ver="8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-8', 'B2_CXXSTD': '17,2a', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
linux_cxx("B2_TOOLSET=clang-6.0 B2_CXXSTD=03,11,14 Job 13", "clang++-6.0", packages="clang-6.0 libc6-dbg libc++-dev libstdc++-8-dev", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-6.0', 'B2_CXXSTD': '03,11,14', 'B2_CXXFLAGS': '-stdlib=libc++', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
osx_cxx("B2_TOOLSET=clang B2_CXXSTD=03,11,17 BOOST_DAT Job 14", "g++", packages="", buildtype="boost", buildscript="drone", environment={'B2_TOOLSET': 'clang', 'B2_CXXSTD': '03,11,17', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv),
linux_cxx("COMMENT=codecov.io B2_CXXSTD=03,11 B2_TOOLSET Job 15", "g++-8", packages="g++-8", buildtype="b5847f804b-0fcaf592f9", buildscript="drone", image=linuxglobalimage, environment={'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', 'DRONE_JOB_UUID': 'f1abd67035'}, globalenv=globalenv),
linux_cxx("COMMENT=asan B2_VARIANT=variant=debug B2_TOOL Job 16", "g++-8", packages="g++-8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'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', 'DRONE_EXTRA_PRIVILEGED': 'True', 'DRONE_JOB_UUID': '1574bddb75'}, globalenv=globalenv, privileged=True),
linux_cxx("COMMENT=tsan B2_VARIANT=variant=debug B2_TOOL Job 17", "g++-8", packages="g++-8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'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', 'DRONE_JOB_UUID': '0716d9708d'}, globalenv=globalenv),
# allow_failures set for this job #
# linux_cxx("COMMENT=ubsan B2_VARIANT=variant=debug B2_TOO Job 18", "g++-8", packages="g++-8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'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', 'DRONE_JOB_UUID': '9e6a55b6b4'}, globalenv=globalenv),
linux_cxx("COMMENT=valgrind B2_TOOLSET=clang-6.0 B2_CXXS Job 19", "clang++-6.0", packages="clang-6.0 libc6-dbg libc++-dev libstdc++-8-dev", llvm_os="xenial", llvm_ver="6.0", buildtype="b5847f804b-db180b7bd2", buildscript="drone", image=linuxglobalimage, environment={'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', 'DRONE_JOB_UUID': 'b3f0c7f6bb'}, globalenv=globalenv),
linux_cxx("COMMENT=Coverity Scan B2_TOOLSET=clang BOOS Job 20", "g++", packages="binutils-gold gdb libc6-dbg", buildtype="b5847f804b-cce9827eb5", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'Coverity Scan', 'B2_TOOLSET': 'clang', 'BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS': '1', 'DRONE_JOB_UUID': '91032ad7bb'}, globalenv=globalenv),
]
# from https://github.com/boostorg/boost-ci
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")

View File

@@ -0,0 +1,107 @@
#!/bin/bash
# Copyright 2020 Rene Rivera, Sam Darwin
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt)
set -e
set -x
export TRAVIS_BUILD_DIR=$(pwd)
export DRONE_BUILD_DIR=$(pwd)
export TRAVIS_BRANCH=$DRONE_BRANCH
export VCS_COMMIT_ID=$DRONE_COMMIT
export GIT_COMMIT=$DRONE_COMMIT
export REPO_NAME=$DRONE_REPO
export PATH=~/.local/bin:/usr/local/bin:$PATH
if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then
echo '==================================> INSTALL'
git clone https://github.com/boostorg/boost-ci.git boost-ci
cp -pr boost-ci/ci boost-ci/.codecov.yml .
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
unset -f cd
fi
export SELF=`basename $REPO_NAME`
export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
export BOOST_CI_SRC_FOLDER=$(pwd)
. ./ci/common_install.sh
echo '==================================> SCRIPT'
cd $BOOST_ROOT/libs/$SELF
ci/travis/build.sh
elif [ "$DRONE_JOB_BUILDTYPE" == "b5847f804b-0fcaf592f9" ]; then
echo '==================================> INSTALL'
git clone https://github.com/boostorg/boost-ci.git boost-ci
cp -pr boost-ci/ci boost-ci/.codecov.yml .
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
unset -f cd
fi
export SELF=`basename $REPO_NAME`
export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
export BOOST_CI_SRC_FOLDER=$(pwd)
. ./ci/common_install.sh
echo '==================================> SCRIPT'
cd $BOOST_ROOT/libs/$SELF
ci/travis/codecov.sh
elif [ "$DRONE_JOB_BUILDTYPE" == "b5847f804b-db180b7bd2" ]; then
echo '==================================> INSTALL'
git clone https://github.com/boostorg/boost-ci.git boost-ci
cp -pr boost-ci/ci boost-ci/.codecov.yml .
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
unset -f cd
fi
export SELF=`basename $REPO_NAME`
export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
export BOOST_CI_SRC_FOLDER=$(pwd)
. ./ci/common_install.sh
echo '==================================> SCRIPT'
cd $BOOST_ROOT/libs/$SELF
ci/travis/valgrind.sh
elif [ "$DRONE_JOB_BUILDTYPE" == "b5847f804b-cce9827eb5" ]; then
echo '==================================> INSTALL'
git clone https://github.com/boostorg/boost-ci.git boost-ci
cp -pr boost-ci/ci boost-ci/.codecov.yml .
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
unset -f cd
fi
export SELF=`basename $REPO_NAME`
export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
export BOOST_CI_SRC_FOLDER=$(pwd)
. ./ci/common_install.sh
echo '==================================> SCRIPT'
if [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$DRONE_BRANCH" = "develop" -o "$DRONE_BRANCH" = "master" \) -a "$DRONE_BUILD_EVENT" = "push" ] ; then
cd $BOOST_ROOT/libs/$SELF
ci/travis/coverity.sh
fi
fi

View File

@@ -0,0 +1,96 @@
* text=auto !eol svneol=native#text/plain
*.gitattributes text svneol=native#text/plain
# Scriptish formats
*.bat text svneol=native#text/plain
*.bsh text svneol=native#text/x-beanshell
*.cgi text svneol=native#text/plain
*.cmd text svneol=native#text/plain
*.js text svneol=native#text/javascript
*.php text svneol=native#text/x-php
*.pl text svneol=native#text/x-perl
*.pm text svneol=native#text/x-perl
*.py text svneol=native#text/x-python
*.sh eol=lf svneol=LF#text/x-sh
configure eol=lf svneol=LF#text/x-sh
# Image formats
*.bmp binary svneol=unset#image/bmp
*.gif binary svneol=unset#image/gif
*.ico binary svneol=unset#image/ico
*.jpeg binary svneol=unset#image/jpeg
*.jpg binary svneol=unset#image/jpeg
*.png binary svneol=unset#image/png
*.tif binary svneol=unset#image/tiff
*.tiff binary svneol=unset#image/tiff
*.svg text svneol=native#image/svg%2Bxml
# Data formats
*.pdf binary svneol=unset#application/pdf
*.avi binary svneol=unset#video/avi
*.doc binary svneol=unset#application/msword
*.dsp text svneol=crlf#text/plain
*.dsw text svneol=crlf#text/plain
*.eps binary svneol=unset#application/postscript
*.gz binary svneol=unset#application/gzip
*.mov binary svneol=unset#video/quicktime
*.mp3 binary svneol=unset#audio/mpeg
*.ppt binary svneol=unset#application/vnd.ms-powerpoint
*.ps binary svneol=unset#application/postscript
*.psd binary svneol=unset#application/photoshop
*.rdf binary svneol=unset#text/rdf
*.rss text svneol=unset#text/xml
*.rtf binary svneol=unset#text/rtf
*.sln text svneol=native#text/plain
*.swf binary svneol=unset#application/x-shockwave-flash
*.tgz binary svneol=unset#application/gzip
*.vcproj text svneol=native#text/xml
*.vcxproj text svneol=native#text/xml
*.vsprops text svneol=native#text/xml
*.wav binary svneol=unset#audio/wav
*.xls binary svneol=unset#application/vnd.ms-excel
*.zip binary svneol=unset#application/zip
# Text formats
.htaccess text svneol=native#text/plain
*.bbk text svneol=native#text/xml
*.cmake text svneol=native#text/plain
*.css text svneol=native#text/css
*.dtd text svneol=native#text/xml
*.htm text svneol=native#text/html
*.html text svneol=native#text/html
*.ini text svneol=native#text/plain
*.log text svneol=native#text/plain
*.mak text svneol=native#text/plain
*.qbk text svneol=native#text/plain
*.rst text svneol=native#text/plain
*.sql text svneol=native#text/x-sql
*.txt text svneol=native#text/plain
*.xhtml text svneol=native#text/xhtml%2Bxml
*.xml text svneol=native#text/xml
*.xsd text svneol=native#text/xml
*.xsl text svneol=native#text/xml
*.xslt text svneol=native#text/xml
*.xul text svneol=native#text/xul
*.yml text svneol=native#text/plain
boost-no-inspect text svneol=native#text/plain
CHANGES text svneol=native#text/plain
COPYING text svneol=native#text/plain
INSTALL text svneol=native#text/plain
Jamfile text svneol=native#text/plain
Jamroot text svneol=native#text/plain
Jamfile.v2 text svneol=native#text/plain
Jamrules text svneol=native#text/plain
Makefile* text svneol=native#text/plain
README text svneol=native#text/plain
TODO text svneol=native#text/plain
# Code formats
*.c text svneol=native#text/plain
*.cpp text svneol=native#text/plain
*.h text svneol=native#text/plain
*.hpp text svneol=native#text/plain
*.ipp text svneol=native#text/plain
*.tpp text svneol=native#text/plain
*.jam text svneol=native#text/plain
*.java text svneol=native#text/plain

View File

@@ -0,0 +1,329 @@
# Copyright 2020-2021 Peter Dimov
# Copyright 2021 Andrey Semashev
# Copyright 2021 Alexander Grund
# Copyright 2022 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)
---
name: CI
on:
pull_request:
push:
branches:
- master
- develop
- bugfix/**
- feature/**
- fix/**
- pr/**
concurrency:
group: ${{format('{0}:{1}', github.repository, github.ref)}}
cancel-in-progress: true
env:
GIT_FETCH_JOBS: 8
NET_RETRY_COUNT: 5
B2_CI_VERSION: 1
B2_VARIANT: debug,release
B2_LINK: shared,static
LCOV_BRANCH_COVERAGE: 0
CODECOV_NAME: Github Actions
SELF_CONTAINED_HEADER_TESTS: 0
jobs:
posix:
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
# Linux, gcc
- { compiler: gcc-4.8, cxxstd: '03,11', os: ubuntu-18.04 }
- { compiler: gcc-5, cxxstd: '03,11', os: ubuntu-18.04 }
- { compiler: gcc-6, cxxstd: '03,11,14,17', os: ubuntu-18.04 }
- { compiler: gcc-7, cxxstd: '03,11,14,17', os: ubuntu-18.04 }
- { compiler: gcc-8, cxxstd: '03,11,14,17,2a', os: ubuntu-18.04 }
- { compiler: gcc-9, cxxstd: '03,11,14,17,2a', os: ubuntu-18.04 }
- { compiler: gcc-10, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 }
- { compiler: gcc-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04, self-contained-header-tests: 1 }
# disabled: there are too many issues in serialization and not enough time to add suppressions
# - { name: GCC w/ sanitizers, sanitize: yes,
# compiler: gcc-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 }
- { name: Collect coverage, coverage: yes,
compiler: gcc-10, cxxstd: '03,11', os: ubuntu-20.04, install: 'g++-10-multilib', address-model: '32,64' }
# Linux, clang
- { compiler: clang-3.9, cxxstd: '03,11,14', os: ubuntu-18.04 }
- { compiler: clang-4.0, cxxstd: '03,11,14', os: ubuntu-18.04 }
- { compiler: clang-5.0, cxxstd: '03,11,14,1z', os: ubuntu-18.04 }
- { compiler: clang-6.0, cxxstd: '03,11,14,17', os: ubuntu-18.04 }
- { compiler: clang-7, cxxstd: '03,11,14,17', os: ubuntu-18.04 }
# Note: clang-8 does not fully support C++20, so it is not compatible with some libstdc++ versions in this mode
- { compiler: clang-8, cxxstd: '03,11,14,17,2a', os: ubuntu-18.04, install: 'clang-8 g++-7', gcc_toolchain: 7 }
- { compiler: clang-9, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04 }
- { compiler: clang-10, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 }
- { compiler: clang-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 }
- { compiler: clang-12, cxxstd: '03,11,14,17,20', os: ubuntu-20.04, self-contained-header-tests: 1 }
# libc++
- { compiler: clang-6.0, cxxstd: '03,11,14', os: ubuntu-18.04, stdlib: libc++, install: 'clang-6.0 libc++-dev libc++abi-dev' }
- { compiler: clang-12, cxxstd: '03,11,14,17,20', os: ubuntu-20.04, stdlib: libc++, install: 'clang-12 libc++-12-dev libc++abi-12-dev', self-contained-header-tests: 1 }
# disabled: there are too many issues in serialization and not enough time to add suppressions
# - { name: Clang w/ sanitizers, sanitize: yes,
# compiler: clang-12, cxxstd: '03,11,14,17,20', os: ubuntu-20.04, stdlib: libc++, install: 'clang-12 libc++-12-dev libc++abi-12-dev' }
# OSX, clang
# sanitize disabled: there are too many issues in serialization and not enough time to add suppressions
- { compiler: clang, cxxstd: '03,11,14,17,2a', os: macos-10.15 }
# Coverity Scan
# requires two github secrets in repo to activate; see ci/github/coverity.sh
# does not run on pull requests, only on pushes into develop and master
- { name: Coverity, coverity: yes,
compiler: clang-10, cxxstd: '17', os: ubuntu-20.04, ccache: no }
# multiarch (bigendian testing) - does not support coverage yet
# date_time has no endian compile-time branches
# - { name: Big-endian, multiarch: yes,
# compiler: clang, cxxstd: '17', os: ubuntu-20.04, ccache: no, distro: fedora, edition: 34, arch: s390x }
timeout-minutes: 120
runs-on: ${{matrix.os}}
container: ${{matrix.container}}
env: {B2_USE_CCACHE: 1}
steps:
- name: Setup environment
run: |
if [ -f "/etc/debian_version" ]; then
echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
export DEBIAN_FRONTEND=noninteractive
fi
if [ -n "${{matrix.container}}" ] && [ -f "/etc/debian_version" ]; then
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y sudo software-properties-common
# Need (newer) git
for i in {1..${NET_RETRY_COUNT:-3}}; do sudo -E add-apt-repository -y ppa:git-core/ppa && break || sleep 10; done
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y g++ python libpython-dev git
fi
# multiple job types are not compatible with ccache, they use "ccache: no" in the matrix
if [[ "${{ matrix.ccache }}" == "no" ]]; then
echo "B2_USE_CCACHE=0" >> $GITHUB_ENV
fi
git config --global pack.threads 0
- uses: actions/checkout@v2
with:
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
fetch-depth: ${{ matrix.coverage && '0' || '1' }}
- name: Cache ccache
uses: actions/cache@v2
if: env.B2_USE_CCACHE
with:
path: ~/.ccache
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}
- name: Fetch Boost.CI
uses: actions/checkout@v2
with:
repository: boostorg/boost-ci
ref: master
path: boost-ci-cloned
- name: Get CI scripts folder
run: |
# Copy ci folder if not testing Boost.CI
[[ "$GITHUB_REPOSITORY" =~ "boost-ci" ]] || cp -r boost-ci-cloned/ci .
rm -rf boost-ci-cloned
- name: Install packages
if: startsWith(matrix.os, 'ubuntu')
run: |
SOURCE_KEYS=(${{join(matrix.source_keys, ' ')}})
SOURCES=(${{join(matrix.sources, ' ')}})
# Add this by default
SOURCES+=(ppa:ubuntu-toolchain-r/test)
for key in "${SOURCE_KEYS[@]}"; do
for i in {1..$NET_RETRY_COUNT}; do
wget -O - "$key" | sudo apt-key add - && break || sleep 10
done
done
for source in "${SOURCES[@]}"; do
for i in {1..$NET_RETRY_COUNT}; do
sudo add-apt-repository $source && break || sleep 10
done
done
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
if [[ -z "${{matrix.install}}" ]]; then
pkgs="${{matrix.compiler}}"
pkgs="${pkgs/gcc-/g++-}"
else
pkgs="${{matrix.install}}"
fi
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y $pkgs
- name: Setup GCC Toolchain
if: matrix.gcc_toolchain
run: |
GCC_TOOLCHAIN_ROOT="$HOME/gcc-toolchain"
echo "GCC_TOOLCHAIN_ROOT=$GCC_TOOLCHAIN_ROOT" >> $GITHUB_ENV
MULTIARCH_TRIPLET="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
mkdir -p "$GCC_TOOLCHAIN_ROOT"
ln -s /usr/include "$GCC_TOOLCHAIN_ROOT/include"
ln -s /usr/bin "$GCC_TOOLCHAIN_ROOT/bin"
mkdir -p "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET"
ln -s "/usr/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}" "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}"
- name: Setup multiarch
if: matrix.multiarch
run: |
sudo apt-get install --no-install-recommends -y binfmt-support qemu-user-static
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
git clone https://github.com/jeking3/bdde.git
echo "$(pwd)/bdde/bin/linux" >> ${GITHUB_PATH}
echo "BDDE_DISTRO=${{ matrix.distro }}" >> ${GITHUB_ENV}
echo "BDDE_EDITION=${{ matrix.edition }}" >> ${GITHUB_ENV}
echo "BDDE_ARCH=${{ matrix.arch }}" >> ${GITHUB_ENV}
echo "B2_WRAPPER=bdde" >> ${GITHUB_ENV}
- name: Setup Boost
env:
B2_ADDRESS_MODEL: ${{matrix.address-model}}
B2_COMPILER: ${{matrix.compiler}}
B2_CXXSTD: ${{matrix.cxxstd}}
B2_SANITIZE: ${{matrix.sanitize}}
B2_STDLIB: ${{matrix.stdlib}}
run: source ci/github/install.sh
- name: Setup coverage collection
if: matrix.coverage
run: ci/github/codecov.sh "setup"
- name: Run tests
if: '!matrix.coverity'
run: ci/build.sh
env:
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: ${{ !(matrix.self-contained-header-tests || env.SELF_CONTAINED_HEADER_TESTS) }}
- name: Upload coverage
if: matrix.coverage
run: ci/codecov.sh "upload"
- name: Run coverity
if: matrix.coverity && github.event_name == 'push' && (github.ref_name == 'develop' || github.ref_name == 'master')
run: ci/github/coverity.sh
env:
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: ${{ !(matrix.self-contained-header-tests || env.SELF_CONTAINED_HEADER_TESTS) }}
COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
windows:
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
include:
- { toolset: msvc-14.2, cxxstd: '14,17,20', addrmd: '32,64', os: windows-2019, self-contained-header-tests: 1 }
- { name: Collect coverage, coverage: yes,
toolset: msvc-14.3, cxxstd: '14,17,20', addrmd: '32,64', os: windows-2022 }
- { toolset: gcc, cxxstd: '03,11,14,17,2a', addrmd: '64', os: windows-2019 }
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Fetch Boost.CI
uses: actions/checkout@v2
with:
repository: boostorg/boost-ci
ref: master
path: boost-ci-cloned
- name: Get CI scripts folder
run: |
REM Copy ci folder if not testing Boost.CI
if "%GITHUB_REPOSITORY%" == "%GITHUB_REPOSITORY:boost-ci=%" xcopy /s /e /q /i /y boost-ci-cloned\ci .\ci
rmdir /s /q boost-ci-cloned
- name: Setup Boost
run: ci\github\install.bat
- name: Run tests
if: '!matrix.coverage'
run: ci\build.bat
env:
B2_TOOLSET: ${{matrix.toolset}}
B2_CXXSTD: ${{matrix.cxxstd}}
B2_ADDRESS_MODEL: ${{matrix.addrmd}}
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: ${{ !(matrix.self-contained-header-tests || env.SELF_CONTAINED_HEADER_TESTS) }}
- name: Collect coverage
shell: powershell
if: matrix.coverage
run: ci\opencppcoverage.ps1
env:
B2_TOOLSET: ${{matrix.toolset}}
B2_CXXSTD: ${{matrix.cxxstd}}
B2_ADDRESS_MODEL: ${{matrix.addrmd}}
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS: ${{ !(matrix.self-contained-header-tests || env.SELF_CONTAINED_HEADER_TESTS) }}
- name: Upload coverage
if: matrix.coverage
uses: codecov/codecov-action@v2
with:
files: __out/cobertura.xml
CMake:
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-20.04, build_shared: ON, build_type: Release, generator: 'Unix Makefiles' }
- { os: ubuntu-20.04, build_shared: OFF, build_type: Debug, generator: 'Unix Makefiles' }
- { os: windows-2019, build_shared: ON, build_type: Release, generator: 'Visual Studio 16 2019' }
- { os: windows-2019, build_shared: OFF, build_type: Debug, generator: 'Visual Studio 16 2019' }
timeout-minutes: 120
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Fetch Boost.CI
uses: actions/checkout@v2
with:
repository: boostorg/boost-ci
ref: master
path: boost-ci-cloned
- name: Get CI scripts folder
run: |
# Copy ci folder if not testing Boost.CI
[[ "$GITHUB_REPOSITORY" =~ "boost-ci" ]] || cp -r boost-ci-cloned/ci .
rm -rf boost-ci-cloned
- name: Setup Boost
env: {B2_DONT_BOOTSTRAP: 1}
run: source ci/github/install.sh
- name: Run CMake
run: |
cd "$BOOST_ROOT"
mkdir __build_cmake_test__ && cd __build_cmake_test__
cmake -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBOOST_INCLUDE_LIBRARIES=$SELF -DBUILD_SHARED_LIBS=${{matrix.build_shared}} -DBUILD_TESTING=ON -DBoost_VERBOSE=ON ..
cmake --build . --config ${{matrix.build_type}}

View File

@@ -0,0 +1,2 @@
**/test_facet_file.out
**/time_duration_serialization.*

View File

@@ -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

View File

@@ -0,0 +1,53 @@
# Generated by `boostdep --cmake date_time`
# Copyright 2020 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_date_time VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
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::static_assert
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()

View File

@@ -0,0 +1,11 @@
# 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 ;

View File

@@ -0,0 +1,180 @@
constant BOOST_VERSION : 1.79.0 ;
constant BOOST_VERSION_ABI_TAG : 1_79 ;
constant BOOST_JAMROOT_MODULE : $(__name__) ;
import boostcpp ;
import feature ;
boostcpp.set-version $(BOOST_VERSION) ;
project boost : requirements
<include>include&&"D:/a/1/s/build/vcpkg_installed/x64-windows/include"
<define>BOOST_ALL_NO_LIB=1
<tag>@$(__name__).tag
;
rule boost-install ( libraries * )
{
stagedir = [ option.get stagedir ] ;
install stage
: $(libraries)
: <location>$(stagedir)/lib ;
}
rule tag ( name : type ? : property-set )
{
return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ;
}
rule python-tag ( name : type ? : property-set )
{
return [ boostcpp.python-tag $(name) : $(type) : $(property-set) ] ;
}
if "boost-date-time" != "boost-system"
{
use-project /boost/system : . ;
lib boost_system : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_system-vc140-mt.lib" <variant>release ;
lib boost_system : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_system-vc140-mt-gd.lib" <variant>debug ;
explicit boost_system ;
use-project /boost : . ;
alias system : boost_system ;
}
if "boost-date-time" != "boost-chrono"
{
use-project /boost/chrono : . ;
lib boost_chrono : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_chrono-vc140-mt.lib" <variant>release ;
lib boost_chrono : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_chrono-vc140-mt-gd.lib" <variant>debug ;
explicit boost_chrono ;
}
if "boost-date-time" != "boost-regex"
{
use-project /boost/regex : . ;
lib boost_regex : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_regex-vc140-mt.lib" <variant>release ;
lib boost_regex : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_regex-vc140-mt-gd.lib" <variant>debug ;
explicit boost_regex ;
}
if "boost-date-time" != "boost-date-time"
{
use-project /boost/date_time : . ;
lib boost_date_time : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_date_time-vc140-mt.lib" <variant>release -<library>/boost/date_time//boost_date_time ;
lib boost_date_time : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_date_time-vc140-mt-gd.lib" <variant>debug -<library>/boost/date_time//boost_date_time ;
explicit boost_date_time ;
}
if "boost-date-time" != "boost-thread"
{
use-project /boost/thread : . ;
lib boost_thread : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_thread-vc140-mt.lib" <variant>release : : <library>/boost/date_time//boost_date_time ;
lib boost_thread : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_thread-vc140-mt-gd.lib" <variant>debug : : <library>/boost/date_time//boost_date_time ;
explicit boost_thread ;
}
if "boost-date-time" != "boost-timer"
{
use-project /boost/timer : . ;
lib boost_timer : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_timer-vc140-mt.lib" <variant>release ;
lib boost_timer : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_timer-vc140-mt-gd.lib" <variant>debug ;
explicit boost_timer ;
}
if "boost-date-time" != "boost-filesystem"
{
use-project /boost/filesystem : . ;
lib boost_filesystem : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_filesystem-vc140-mt.lib" <variant>release : : <library>/boost/system//boost_system ;
lib boost_filesystem : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_filesystem-vc140-mt-gd.lib" <variant>debug : : <library>/boost/system//boost_system ;
explicit boost_filesystem ;
}
if "boost-date-time" != "boost-atomic"
{
use-project /boost/atomic : . ;
lib boost_atomic : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_atomic-vc140-mt.lib" <variant>release ;
lib boost_atomic : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_atomic-vc140-mt-gd.lib" <variant>debug ;
explicit boost_atomic ;
}
if "boost-date-time" != "boost-context"
{
feature.feature segmented-stacks : on : optional propagated composite ;
feature.compose <segmented-stacks>on : <define>BOOST_USE_SEGMENTED_STACKS ;
use-project /boost/context : . ;
lib boost_context : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_context-vc140-mt.lib" <variant>release ;
lib boost_context : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_context-vc140-mt-gd.lib" <variant>debug ;
explicit boost_context ;
}
if "boost-date-time" != "boost-test"
{
use-project /boost/test : . ;
lib boost_unit_test_framework : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_unit_test_framework-vc140-mt.lib" <variant>release ;
lib boost_unit_test_framework : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_unit_test_framework-vc140-mt-gd.lib" <variant>debug ;
explicit boost_unit_test_framework ;
}
if "boost-date-time" != "boost-serialization"
{
use-project /boost/serialization : . ;
lib boost_serialization : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_serialization-vc140-mt.lib" <variant>release ;
lib boost_serialization : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_serialization-vc140-mt-gd.lib" <variant>debug ;
explicit boost_serialization ;
}
if "boost-date-time" != "boost-mpi"
{
use-project /boost/mpi : . ;
lib boost_mpi : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_mpi-vc140-mt.lib" <variant>release : : <library>/boost/serialization//boost_serialization ;
lib boost_mpi : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_mpi-vc140-mt-gd.lib" <variant>debug : : <library>/boost/serialization//boost_serialization ;
explicit boost_mpi ;
}
if "boost-date-time" != "boost-container"
{
use-project /boost/container : . ;
lib boost_container : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_container-vc140-mt.lib" <variant>release ;
lib boost_container : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_container-vc140-mt-gd.lib" <variant>debug ;
explicit boost_container ;
}
if "boost-date-time" != "boost-python"
{
use-project /boost/python : . ;
lib boost_python : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_python-vc140-mt.lib" <variant>release ;
lib boost_python : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_python-vc140-mt-gd.lib" <variant>debug ;
explicit boost_python ;
}
rule requires ( foo * )
{
}
rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * )
{
name = boost_$(name) ;
lib $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ;
boost-install $(name) ;
}
use-project /boost/boost-date-time : build ;
build-project build ;

View File

@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,40 @@
DateTime, part of the collection of [Boost C++ Libraries](http://github.com/boostorg), makes programming with dates and times as simple and natural as programming with strings and integers.
### License
Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
### Properties
* C++03
* Header only
### Build Status
Branch | GHA CI | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
[`master`](https://github.com/boostorg/date_time/tree/master) | [![Build Status](https://github.com/boostorg/date_time/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/date_time/actions?query=branch:master) | [![Build status](https://ci.appveyor.com/api/projects/status/upf5c528fy09fudk?svg=true)](https://ci.appveyor.com/project/jeking3/date-time-1evbf) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/14908/badge.svg)](https://scan.coverity.com/projects/boostorg-date_time) | [![codecov](https://codecov.io/gh/boostorg/date_time/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/date_time/branch/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/date_time.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/date_time.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/date_time.html)
[`develop`](https://github.com/boostorg/date_time/tree/develop) | [![Build Status](https://github.com/boostorg/date_time/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/date_time/actions?query=branch:develop) | [![Build status](https://ci.appveyor.com/api/projects/status/upf5c528fy09fudk/branch/develop?svg=true)](https://ci.appveyor.com/project/boostorg/date_time/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/14908/badge.svg)](https://scan.coverity.com/projects/boostorg-date_time) | [![codecov](https://codecov.io/gh/boostorg/date_time/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/date_time/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/date_time.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/date_time.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/date_time.html)
### Directories
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
* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-date_time): Be sure to read the documentation first to see if it answers your question.
* [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.

View File

@@ -0,0 +1,24 @@
# Copyright (c) 2002-2005 CrystalClear Software, Inc.
# 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)
#
# date_time is now header only -- this file provides a stub for backward compatibility
#
project boost/date_time
: requirements
<define>DATE_TIME_INLINE
<link>shared:<define>BOOST_ALL_DYN_LINK=1
: usage-requirements
<define>DATE_TIME_INLINE
<link>shared:<define>BOOST_DATE_TIME_DYN_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 ;

View File

@@ -0,0 +1,92 @@
The csv file containing the zone_specs used by the
boost::local_time::tz_database is intended to be customized by the
library user. When customizing this file (or creating your own) the
file must follow a specific format.
This first line is expected to contain column headings and is therefore
not processed by the tz_database.
Each record (line) must have eleven fields. Some of those fields can
be empty. Every field (even empty ones) must be enclosed in double-quotes.
Ex:
"America/Phoenix" <- string enclosed in quotes
"" <- empty field
Some fields represent a length of time. The format of these fields must be:
"{+|-}hh:mm[:ss]" <- length-of-time format
Where the plus or minus is mandatory and the seconds are optional.
Since some time zones do not use daylight savings it is not always necessary
for every field in a zone_spec to contain a value. All zone_specs must have
at least ID and GMT offset. Zones that use daylight savings must have all
fields filled except: STD ABBR, STD NAME, DST NAME. You should take note
that DST ABBR is mandatory for zones that use daylight savings (see field
descriptions for further details).
********* Fields and their description/details *********
* ID
Contains the identifying string for the zone_spec. Any string will
do as long as it's unique. No two ID's can be the same.
* STD ABBR
* STD NAME
* DST ABBR
* DST NAME
These four are all the names and abbreviations used by the time
zone being described. While any string will do in these fields,
care should be taken. These fields hold the strings that will be
used in the output of many of the local_time classes.
Ex:
time_zone nyc = tz_db.time_zone_from_region("America/New_York");
local_time ny_time(date(2004, Aug, 30), IS_DST, nyc);
cout << ny_time.to_long_string() << endl;
// 2004-Aug-30 00:00:00 Eastern Daylight Time
cout << ny_time.to_short_string() << endl;
// 2004-Aug-30 00:00:00 EDT
NOTE: The exact format/function names may vary - see local_time
documentation for further details.
* GMT offset
This is the number of hours added to utc to get the local time
before any daylight savings adjustments are made. Some examples
are: America/New_York offset -5 hours, & Africa/Cairo offset +2 hours.
The format must follow the length-of-time format described above.
* DST adjustment
The amount of time added to gmt_offset when daylight savings is in
effect. The format must follow the length-of-time format described
above.
#####################################################################
##### TODO: more rule capabilities are needed - this portion of #####
##### the tz_database is incomplete #####
#####################################################################
* DST Start Date rule
This is a specially formatted string that describes the day of year
in which the transition take place. It holds three fields of it's own,
separated by semicolons.
* The first field indicates the "nth" weekday of the month. The
possible values are: 1 (first), 2 (second), 3 (third),
4 (fourth), 5 (fifth), and -1 (last).
* The second field indicates the day-of-week from 0-6 (Sun=0).
* The third field indicates the month from 1-12 (Jan=1).
Examples are: "-1;5;9"="Last Friday of September",
"2;1;3"="Second Monday of March"
* Start time
Start time is the number of hours past midnight, on the day of the
start transition, the transition takes place. More simply put, the
time of day the transition is made (in 24 hours format). The format
must follow the length-of-time format described above with the
exception that it must always be positive.
* DST End date rule
See DST Start date rule. The difference here is this is the day
daylight savings ends (transition to STD).
* End time
Same as Start time.

View File

@@ -0,0 +1,520 @@
"ID","STD ABBR","STD NAME","DST ABBR","DST NAME","GMT offset","DST adjustment","DST Start Date rule","Start time","DST End date rule","End time"
"Africa/Abidjan","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Accra","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Addis_Ababa","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Africa/Algiers","CET","CET","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Asmara","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Africa/Asmera","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Africa/Bamako","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Bangui","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Banjul","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Bissau","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Blantyre","CAT","CAT","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Brazzaville","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Bujumbura","CAT","CAT","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Cairo","EET","EET","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Casablanca","WET","WET","WEST","WEST","+00:00:00","+01:00:00","2;0;7","+02:00:00","-1;0;10","+03:00:00"
"Africa/Ceuta","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Africa/Conakry","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Dakar","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Dar_es_Salaam","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Africa/Djibouti","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Africa/Douala","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/El_Aaiun","WET","WET","WEST","WEST","+00:00:00","+01:00:00","2;0;7","+02:00:00","-1;0;10","+03:00:00"
"Africa/Freetown","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Gaborone","CAT","CAT","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Harare","CAT","CAT","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Johannesburg","SAST","SAST","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Juba","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Africa/Kampala","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Africa/Khartoum","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Africa/Kigali","CAT","CAT","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Kinshasa","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Lagos","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Libreville","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Lome","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Luanda","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Lubumbashi","CAT","CAT","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Lusaka","CAT","CAT","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Malabo","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Maputo","CAT","CAT","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Maseru","SAST","SAST","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Mbabane","SAST","SAST","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Mogadishu","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Africa/Monrovia","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Nairobi","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Africa/Ndjamena","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Niamey","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Nouakchott","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Ouagadougou","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Porto-Novo","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Porto_Novo","WAT","WAT","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Sao_Tome","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Timbuktu","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Africa/Tripoli","EET","EET","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Africa/Tunis","CET","CET","","","+01:00:00","+00:00:00","","","","+00:00:00"
"Africa/Windhoek","WAT","WAT","WAST","WAST","+01:00:00","+01:00:00","1;0;9","+02:00:00","1;0;4","+02:00:00"
"America/Adak","HST","HST","HDT","HDT","-10:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Anchorage","AKST","AKST","AKDT","AKDT","-09:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Anguilla","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Antigua","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Araguaina","BRT","BRT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/Buenos_Aires","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/Catamarca","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/ComodRivadavia","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/Cordoba","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/Jujuy","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/La_Rioja","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/Mendoza","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/Rio_Gallegos","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/Salta","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/San_Juan","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/San_Luis","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/Tucuman","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Argentina/Ushuaia","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Aruba","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Asuncion","PYT","PYT","PYST","PYST","-04:00:00","+01:00:00","1;0;10","+00:00:00","-1;0;3","+00:00:00"
"America/Atikokan","EST","EST","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Atka","HST","HST","HDT","HDT","-10:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Bahia","BRT","BRT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Bahia_Banderas","CST","CST","CDT","CDT","-06:00:00","+01:00:00","1;0;4","+02:00:00","-1;0;10","+02:00:00"
"America/Barbados","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Belem","BRT","BRT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Belize","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"America/Beulah","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Blanc-Sablon","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Blanc_Sablon","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Boa_Vista","AMT","AMT","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Bogota","COT","COT","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Boise","MST","MST","MDT","MDT","-07:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Buenos_Aires","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Cambridge_Bay","MST","MST","MDT","MDT","-07:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Campo_Grande","AMT","AMT","AMST","AMST","-04:00:00","+01:00:00","3;0;10","+00:00:00","3;0;2","+00:00:00"
"America/Cancun","EST","EST","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Caracas","VET","VET","","","-04:30:00","+00:00:00","","","","+00:00:00"
"America/Catamarca","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Cayenne","GFT","GFT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Cayman","EST","EST","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Center","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Chicago","CST","Central Standard Time","CDT","Central Daylight Time","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Chihuahua","MST","MST","MDT","MDT","-07:00:00","+01:00:00","1;0;4","+02:00:00","-1;0;10","+02:00:00"
"America/ComodRivadavia","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Coral_Harbour","EST","EST","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Cordoba","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Costa_Rica","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"America/Creston","MST","MST","","","-07:00:00","+00:00:00","","","","+00:00:00"
"America/Cuiaba","AMT","AMT","AMST","AMST","-04:00:00","+01:00:00","3;0;10","+00:00:00","3;0;2","+00:00:00"
"America/Curacao","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Danmarkshavn","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"America/Dawson","PST","PST","PDT","PDT","-08:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Dawson_Creek","MST","MST","","","-07:00:00","+00:00:00","","","","+00:00:00"
"America/Denver","MST","Mountain Standard Time","MDT","Mountain Daylight Time","-07:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Detroit","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Dominica","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Edmonton","MST","MST","MDT","MDT","-07:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Eirunepe","ACT","ACT","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/El_Salvador","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"America/Ensenada","PST","PST","PDT","PDT","-08:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Fortaleza","BRT","BRT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Fort_Wayne","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Glace_Bay","AST","AST","ADT","ADT","-04:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Godthab","WGT","WGT","WGST","WGST","-03:00:00","+01:00:00","-1;6;3","+22:00:00","-1;6;10","+23:00:00"
"America/Goose_Bay","AST","AST","ADT","ADT","-04:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Grand_Turk","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Grenada","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Guadeloupe","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Guatemala","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"America/Guayaquil","ECT","ECT","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Guyana","GYT","GYT","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Halifax","AST","AST","ADT","ADT","-04:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Havana","CST","CST","CDT","CDT","-05:00:00","+01:00:00","2;0;3","+00:00:00","1;0;11","+01:00:00"
"America/Hermosillo","MST","MST","","","-07:00:00","+00:00:00","","","","+00:00:00"
"America/Indiana/Indianapolis","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Indiana/Knox","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Indiana/Marengo","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Indiana/Petersburg","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Indiana/Tell_City","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Indiana/Vevay","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Indiana/Vincennes","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Indiana/Winamac","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Indianapolis","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Inuvik","MST","MST","MDT","MDT","-07:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Iqaluit","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Jamaica","EST","EST","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Jujuy","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Juneau","AKST","AKST","AKDT","AKDT","-09:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Kentucky/Louisville","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Kentucky/Monticello","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Knox","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Knox_IN","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Kralendijk","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/La_Paz","BOT","BOT","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/La_Rioja","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Lima","PET","PET","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Los_Angeles","PST","Pacific Standard Time","PDT","Pacific Daylight Time","-08:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Louisville","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Lower_Princes","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Maceio","BRT","BRT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Managua","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"America/Manaus","AMT","AMT","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Marengo","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Marigot","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Martinique","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Matamoros","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Mazatlan","MST","MST","MDT","MDT","-07:00:00","+01:00:00","1;0;4","+02:00:00","-1;0;10","+02:00:00"
"America/Mendoza","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Menominee","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Merida","CST","CST","CDT","CDT","-06:00:00","+01:00:00","1;0;4","+02:00:00","-1;0;10","+02:00:00"
"America/Metlakatla","AKST","AKST","AKDT","AKDT","-09:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Mexico_City","CST","CST","CDT","CDT","-06:00:00","+01:00:00","1;0;4","+02:00:00","-1;0;10","+02:00:00"
"America/Miquelon","PMST","PMST","PMDT","PMDT","-03:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Moncton","AST","AST","ADT","ADT","-04:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Monterrey","CST","CST","CDT","CDT","-06:00:00","+01:00:00","1;0;4","+02:00:00","-1;0;10","+02:00:00"
"America/Montevideo","UYT","UYT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Monticello","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Montreal","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Montserrat","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Nassau","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/New_Salem","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/New_York","EST","Eastern Standard Time","EDT","Eastern Daylight Time","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Nipigon","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Nome","AKST","AKST","AKDT","AKDT","-09:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Noronha","FNT","FNT","","","-02:00:00","+00:00:00","","","","+00:00:00"
"America/North_Dakota/Beulah","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/North_Dakota/Center","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/North_Dakota/New_Salem","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Ojinaga","MST","MST","MDT","MDT","-07:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Panama","EST","EST","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Pangnirtung","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Paramaribo","SRT","SRT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Petersburg","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Phoenix","MST","Mountain Standard Time","","","-07:00:00","+00:00:00","","","","+00:00:00"
"America/Port-au-Prince","EST","EST","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Porto_Acre","ACT","ACT","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Porto_Velho","AMT","AMT","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Port_au_Prince","EST","EST","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Port_of_Spain","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Puerto_Rico","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Rainy_River","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Rankin_Inlet","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Recife","BRT","BRT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Regina","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"America/Resolute","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Rio_Branco","ACT","ACT","","","-05:00:00","+00:00:00","","","","+00:00:00"
"America/Rio_Gallegos","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Rosario","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Salta","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Santarem","BRT","BRT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Santa_Isabel","PST","PST","PDT","PDT","-08:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Santiago","CLT","CLT","CLST","CLST","-04:00:00","+01:00:00","2;0;8","+00:00:00","3;0;5","+00:00:00"
"America/Santo_Domingo","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/San_Juan","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/San_Luis","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Sao_Paulo","BRT","BRT","BRST","BRST","-03:00:00","+01:00:00","3;0;10","+00:00:00","3;0;2","+00:00:00"
"America/Scoresbysund","EGT","EGT","EGST","EGST","-01:00:00","+01:00:00","-1;0;3","+00:00:00","-1;0;10","+01:00:00"
"America/Shiprock","MST","MST","MDT","MDT","-07:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Sitka","AKST","AKST","AKDT","AKDT","-09:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/St_Barthelemy","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/St_Johns","NST","NST","NDT","NDT","-03:30:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/St_Kitts","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/St_Lucia","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/St_Thomas","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/St_Vincent","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Swift_Current","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"America/Tegucigalpa","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"America/Tell_City","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Thule","AST","AST","ADT","ADT","-04:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Thunder_Bay","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Tijuana","PST","PST","PDT","PDT","-08:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Toronto","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Tortola","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Tucuman","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Ushuaia","ART","ART","","","-03:00:00","+00:00:00","","","","+00:00:00"
"America/Vancouver","PST","PST","PDT","PDT","-08:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Vevay","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Vincennes","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Virgin","AST","AST","","","-04:00:00","+00:00:00","","","","+00:00:00"
"America/Whitehorse","PST","PST","PDT","PDT","-08:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Winamac","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Winnipeg","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Yakutat","AKST","AKST","AKDT","AKDT","-09:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"America/Yellowknife","MST","MST","MDT","MDT","-07:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"Antarctica/Casey","AWST","AWST","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Antarctica/Davis","DAVT","DAVT","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Antarctica/DumontDUrville","DDUT","DDUT","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Antarctica/Macquarie","MIST","MIST","","","+11:00:00","+00:00:00","","","","+00:00:00"
"Antarctica/Mawson","MAWT","MAWT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Antarctica/McMurdo","NZST","NZST","NZDT","NZDT","+12:00:00","+01:00:00","-1;0;9","+02:00:00","1;0;4","+03:00:00"
"Antarctica/Palmer","CLT","CLT","CLST","CLST","-04:00:00","+01:00:00","2;0;8","+00:00:00","3;0;5","+00:00:00"
"Antarctica/Rothera","ROTT","ROTT","","","-03:00:00","+00:00:00","","","","+00:00:00"
"Antarctica/South_Pole","NZST","NZST","NZDT","NZDT","+12:00:00","+01:00:00","-1;0;9","+02:00:00","1;0;4","+03:00:00"
"Antarctica/Syowa","SYOT","SYOT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Antarctica/Troll","UTC","UTC","CEST","CEST","+00:00:00","+02:00:00","-1;0;3","+01:00:00","-1;0;10","+03:00:00"
"Antarctica/Vostok","VOST","VOST","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Arctic/Longyearbyen","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Asia/Aden","AST","AST","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Asia/Almaty","ALMT","ALMT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Amman","EET","EET","EEST","EEST","+02:00:00","+01:00:00","1;5;4","+00:00:00","-1;5;10","+01:00:00"
"Asia/Anadyr","ANAT","ANAT","","","+12:00:00","+00:00:00","","","","+00:00:00"
"Asia/Aqtau","AQTT","AQTT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Asia/Aqtobe","AQTT","AQTT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Asia/Ashgabat","TMT","TMT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Asia/Ashkhabad","TMT","TMT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Asia/Baghdad","AST","AST","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Asia/Bahrain","AST","AST","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Asia/Baku","AZT","AZT","","","+04:00:00","+00:00:00","","","","+00:00:00"
"Asia/Bangkok","ICT","ICT","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Asia/Beirut","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+00:00:00","-1;0;10","+00:00:00"
"Asia/Bishkek","KGT","KGT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Brunei","BNT","BNT","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Calcutta","IST","IST","","","+05:30:00","+00:00:00","","","","+00:00:00"
"Asia/Chita","YAKT","YAKT","","","+09:00:00","+00:00:00","","","","+00:00:00"
"Asia/Choibalsan","CHOT","CHOT","CHOST","CHOST","+08:00:00","+01:00:00","-1;6;3","+02:00:00","-1;6;9","+00:00:00"
"Asia/Chongqing","CST","CST","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Chungking","CST","CST","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Colombo","IST","IST","","","+05:30:00","+00:00:00","","","","+00:00:00"
"Asia/Dacca","BDT","BDT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Damascus","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;5;3","+00:00:00","-1;5;10","+00:00:00"
"Asia/Dhaka","BDT","BDT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Dili","TLT","TLT","","","+09:00:00","+00:00:00","","","","+00:00:00"
"Asia/Dubai","GST","GST","","","+04:00:00","+00:00:00","","","","+00:00:00"
"Asia/Dushanbe","TJT","TJT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Asia/Gaza","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;6;3","+01:00:00","3;5;10","+00:00:00"
"Asia/Harbin","CST","CST","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Hebron","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;6;3","+01:00:00","3;5;10","+00:00:00"
"Asia/Hong_Kong","HKT","HKT","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Hovd","HOVT","HOVT","HOVST","HOVST","+07:00:00","+01:00:00","-1;6;3","+02:00:00","-1;6;9","+00:00:00"
"Asia/Ho_Chi_Minh","ICT","ICT","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Asia/Irkutsk","IRKT","IRKT","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Istanbul","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Asia/Jakarta","WIB","WIB","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Asia/Jayapura","WIT","WIT","","","+09:00:00","+00:00:00","","","","+00:00:00"
"Asia/Jerusalem","IST","IST","IDT","IDT","+02:00:00","+01:00:00","-1;5;3","+02:00:00","-1;0;10","+02:00:00"
"Asia/Kabul","AFT","AFT","","","+04:30:00","+00:00:00","","","","+00:00:00"
"Asia/Kamchatka","PETT","PETT","","","+12:00:00","+00:00:00","","","","+00:00:00"
"Asia/Karachi","PKT","PKT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Asia/Kashgar","XJT","XJT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Kathmandu","NPT","NPT","","","+05:45:00","+00:00:00","","","","+00:00:00"
"Asia/Katmandu","NPT","NPT","","","+05:45:00","+00:00:00","","","","+00:00:00"
"Asia/Khandyga","YAKT","YAKT","","","+09:00:00","+00:00:00","","","","+00:00:00"
"Asia/Kolkata","IST","IST","","","+05:30:00","+00:00:00","","","","+00:00:00"
"Asia/Krasnoyarsk","KRAT","KRAT","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Asia/Kuala_Lumpur","MYT","MYT","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Kuching","MYT","MYT","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Kuwait","AST","AST","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Asia/Macao","CST","CST","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Macau","CST","CST","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Magadan","MAGT","MAGT","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Asia/Makassar","WITA","WITA","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Manila","PHT","PHT","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Muscat","GST","GST","","","+04:00:00","+00:00:00","","","","+00:00:00"
"Asia/Nicosia","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Asia/Novokuznetsk","KRAT","KRAT","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Asia/Novosibirsk","NOVT","NOVT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Omsk","OMST","OMST","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Oral","ORAT","ORAT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Asia/Phnom_Penh","ICT","ICT","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Asia/Pontianak","WIB","WIB","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Asia/Pyongyang","KST","KST","","","+08:30:00","+00:00:00","","","","+00:00:00"
"Asia/Qatar","AST","AST","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Asia/Qyzylorda","QYZT","QYZT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Rangoon","MMT","MMT","","","+06:30:00","+00:00:00","","","","+00:00:00"
"Asia/Riyadh","AST","AST","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Asia/Saigon","ICT","ICT","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Asia/Sakhalin","SAKT","SAKT","","","+11:00:00","+00:00:00","","","","+00:00:00"
"Asia/Samarkand","UZT","UZT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Asia/Seoul","KST","KST","","","+09:00:00","+00:00:00","","","","+00:00:00"
"Asia/Shanghai","CST","CST","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Singapore","SGT","SGT","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Srednekolymsk","SRET","SRET","","","+11:00:00","+00:00:00","","","","+00:00:00"
"Asia/Taipei","CST","CST","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Tashkent","UZT","UZT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Asia/Tbilisi","GET","GET","","","+04:00:00","+00:00:00","","","","+00:00:00"
"Asia/Tehran","IRST","IRST","IRDT","IRDT","+03:30:00","+01:00:00","3;1;3","+00:00:00","3;3;9","+00:00:00"
"Asia/Tel_Aviv","IST","IST","IDT","IDT","+02:00:00","+01:00:00","-1;5;3","+02:00:00","-1;0;10","+02:00:00"
"Asia/Thimbu","BTT","BTT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Thimphu","BTT","BTT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Tokyo","JST","JST","","","+09:00:00","+00:00:00","","","","+00:00:00"
"Asia/Ujung_Pandang","WITA","WITA","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Asia/Ulaanbaatar","ULAT","ULAT","ULAST","ULAST","+08:00:00","+01:00:00","-1;6;3","+02:00:00","-1;6;9","+00:00:00"
"Asia/Ulan_Bator","ULAT","ULAT","ULAST","ULAST","+08:00:00","+01:00:00","-1;6;3","+02:00:00","-1;6;9","+00:00:00"
"Asia/Urumqi","XJT","XJT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Asia/Ust-Nera","VLAT","VLAT","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Asia/Ust_Nera","VLAT","VLAT","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Asia/Vientiane","ICT","ICT","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Asia/Vladivostok","VLAT","VLAT","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Asia/Yakutsk","YAKT","YAKT","","","+09:00:00","+00:00:00","","","","+00:00:00"
"Asia/Yekaterinburg","YEKT","YEKT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Asia/Yerevan","AMT","AMT","","","+04:00:00","+00:00:00","","","","+00:00:00"
"Atlantic/Azores","AZOT","AZOT","AZOST","AZOST","-01:00:00","+01:00:00","-1;0;3","+00:00:00","-1;0;10","+01:00:00"
"Atlantic/Bermuda","AST","AST","ADT","ADT","-04:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"Atlantic/Canary","WET","WET","WEST","WEST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Atlantic/Cape_Verde","CVT","CVT","","","-01:00:00","+00:00:00","","","","+00:00:00"
"Atlantic/Faeroe","WET","WET","WEST","WEST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Atlantic/Faroe","WET","WET","WEST","WEST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Atlantic/Jan_Mayen","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Atlantic/Madeira","WET","WET","WEST","WEST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Atlantic/Reykjavik","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Atlantic/South_Georgia","GST","GST","","","-02:00:00","+00:00:00","","","","+00:00:00"
"Atlantic/Stanley","FKST","FKST","","","-03:00:00","+00:00:00","","","","+00:00:00"
"Atlantic/St_Helena","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Australia/ACT","AEST","AEST","AEDT","AEDT","+10:00:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/Adelaide","ACST","ACST","ACDT","ACDT","+09:30:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/Brisbane","AEST","AEST","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Australia/Broken_Hill","ACST","ACST","ACDT","ACDT","+09:30:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/Canberra","AEST","AEST","AEDT","AEDT","+10:00:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/Currie","AEST","AEST","AEDT","AEDT","+10:00:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/Darwin","ACST","ACST","","","+09:30:00","+00:00:00","","","","+00:00:00"
"Australia/Eucla","ACWST","ACWST","","","+08:45:00","+00:00:00","","","","+00:00:00"
"Australia/Hobart","AEST","AEST","AEDT","AEDT","+10:00:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/LHI","LHST","LHST","LHDT","LHDT","+10:30:00","+00:30:00","1;0;10","+02:00:00","1;0;4","+02:00:00"
"Australia/Lindeman","AEST","AEST","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Australia/Lord_Howe","LHST","LHST","LHDT","LHDT","+10:30:00","+00:30:00","1;0;10","+02:00:00","1;0;4","+02:00:00"
"Australia/Melbourne","AEST","AEST","AEDT","AEDT","+10:00:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/North","ACST","ACST","","","+09:30:00","+00:00:00","","","","+00:00:00"
"Australia/NSW","AEST","AEST","AEDT","AEDT","+10:00:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/Perth","AWST","AWST","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Australia/Queensland","AEST","AEST","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Australia/South","ACST","ACST","ACDT","ACDT","+09:30:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/Sydney","AEST","AEST","AEDT","AEDT","+10:00:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/Tasmania","AEST","AEST","AEDT","AEDT","+10:00:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/Victoria","AEST","AEST","AEDT","AEDT","+10:00:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Australia/West","AWST","AWST","","","+08:00:00","+00:00:00","","","","+00:00:00"
"Australia/Yancowinna","ACST","ACST","ACDT","ACDT","+09:30:00","+01:00:00","1;0;10","+02:00:00","1;0;4","+03:00:00"
"Brazil/Acre","ACT","ACT","","","-05:00:00","+00:00:00","","","","+00:00:00"
"Brazil/DeNoronha","FNT","FNT","","","-02:00:00","+00:00:00","","","","+00:00:00"
"Brazil/East","BRT","BRT","BRST","BRST","-03:00:00","+01:00:00","3;0;10","+00:00:00","3;0;2","+00:00:00"
"Brazil/West","AMT","AMT","","","-04:00:00","+00:00:00","","","","+00:00:00"
"Canada/Atlantic","AST","AST","ADT","ADT","-04:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"Canada/Central","CST","CST","CDT","CDT","-06:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"Canada/East-Saskatchewan","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"Canada/Eastern","EST","EST","EDT","EDT","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"Canada/East_Saskatchewan","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"Canada/Mountain","MST","MST","MDT","MDT","-07:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"Canada/Newfoundland","NST","NST","NDT","NDT","-03:30:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"Canada/Pacific","PST","PST","PDT","PDT","-08:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"Canada/Saskatchewan","CST","CST","","","-06:00:00","+00:00:00","","","","+00:00:00"
"Canada/Yukon","PST","PST","PDT","PDT","-08:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"Chile/Continental","CLT","CLT","CLST","CLST","-04:00:00","+01:00:00","2;0;8","+00:00:00","3;0;5","+00:00:00"
"Chile/EasterIsland","EAST","EAST","EASST","EASST","-06:00:00","+01:00:00","2;6;8","+22:00:00","2;6;5","+22:00:00"
"Etc/GMT","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Etc/Greenwich","GMT","GMT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Etc/UCT","UCT","UCT","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Etc/Universal","UTC","UTC","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Etc/UTC","UTC","UTC","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Etc/Zulu","UTC","UTC","","","+00:00:00","+00:00:00","","","","+00:00:00"
"Europe/Amsterdam","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Andorra","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Athens","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Belfast","GMT","GMT","BST","BST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Europe/Belgrade","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Berlin","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Bratislava","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Brussels","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Bucharest","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Budapest","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Busingen","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Chisinau","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Copenhagen","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Dublin","GMT","GMT","IST","IST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Europe/Gibraltar","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Guernsey","GMT","GMT","BST","BST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Europe/Helsinki","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Isle_of_Man","GMT","GMT","BST","BST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Europe/Istanbul","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Jersey","GMT","GMT","BST","BST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Europe/Kaliningrad","EET","EET","","","+02:00:00","+00:00:00","","","","+00:00:00"
"Europe/Kiev","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Lisbon","WET","WET","WEST","WEST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Europe/Ljubljana","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/London","GMT","GMT","BST","BST","+00:00:00","+01:00:00","-1;0;3","+01:00:00","-1;0;10","+02:00:00"
"Europe/Luxembourg","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Madrid","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Malta","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Mariehamn","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Minsk","MSK","MSK","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Europe/Monaco","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Moscow","MSK","MSK","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Europe/Nicosia","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Oslo","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Paris","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Podgorica","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Prague","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Riga","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Rome","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Samara","SAMT","SAMT","","","+04:00:00","+00:00:00","","","","+00:00:00"
"Europe/San_Marino","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Sarajevo","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Simferopol","MSK","MSK","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Europe/Skopje","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Sofia","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Stockholm","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Tallinn","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Tirane","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Tiraspol","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Uzhgorod","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Vaduz","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Vatican","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Vienna","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Vilnius","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Volgograd","MSK","MSK","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Europe/Warsaw","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Zagreb","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Europe/Zaporozhye","EET","EET","EEST","EEST","+02:00:00","+01:00:00","-1;0;3","+03:00:00","-1;0;10","+04:00:00"
"Europe/Zurich","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
"Indian/Antananarivo","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Indian/Chagos","IOT","IOT","","","+06:00:00","+00:00:00","","","","+00:00:00"
"Indian/Christmas","CXT","CXT","","","+07:00:00","+00:00:00","","","","+00:00:00"
"Indian/Cocos","CCT","CCT","","","+06:30:00","+00:00:00","","","","+00:00:00"
"Indian/Comoro","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Indian/Kerguelen","TFT","TFT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Indian/Mahe","SCT","SCT","","","+04:00:00","+00:00:00","","","","+00:00:00"
"Indian/Maldives","MVT","MVT","","","+05:00:00","+00:00:00","","","","+00:00:00"
"Indian/Mauritius","MUT","MUT","","","+04:00:00","+00:00:00","","","","+00:00:00"
"Indian/Mayotte","EAT","EAT","","","+03:00:00","+00:00:00","","","","+00:00:00"
"Indian/Reunion","RET","RET","","","+04:00:00","+00:00:00","","","","+00:00:00"
"Mexico/BajaNorte","PST","PST","PDT","PDT","-08:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
"Mexico/BajaSur","MST","MST","MDT","MDT","-07:00:00","+01:00:00","1;0;4","+02:00:00","-1;0;10","+02:00:00"
"Mexico/General","CST","CST","CDT","CDT","-06:00:00","+01:00:00","1;0;4","+02:00:00","-1;0;10","+02:00:00"
"Pacific/Apia","WSST","WSST","WSDT","WSDT","+13:00:00","+01:00:00","-1;0;9","+03:00:00","1;0;4","+04:00:00"
"Pacific/Auckland","NZST","NZST","NZDT","NZDT","+12:00:00","+01:00:00","-1;0;9","+02:00:00","1;0;4","+03:00:00"
"Pacific/Chatham","CHAST","CHAST","CHADT","CHADT","+12:45:00","+01:00:00","-1;0;9","+02:00:00","1;0;4","+03:00:00"
"Pacific/Chuuk","CHUT","CHUT","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Easter","EAST","EAST","EASST","EASST","-06:00:00","+01:00:00","2;6;8","+22:00:00","2;6;5","+22:00:00"
"Pacific/Efate","VUT","VUT","","","+11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Enderbury","PHOT","PHOT","","","+13:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Fakaofo","TKT","TKT","","","+13:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Fiji","FJT","FJT","FJST","FJST","+12:00:00","+01:00:00","1;0;11","+02:00:00","3;0;1","+03:00:00"
"Pacific/Funafuti","TVT","TVT","","","+12:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Galapagos","GALT","GALT","","","-06:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Gambier","GAMT","GAMT","","","-09:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Guadalcanal","SBT","SBT","","","+11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Guam","ChST","ChST","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Honolulu","HST","HST","","","-10:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Johnston","HST","HST","","","-10:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Kiritimati","LINT","LINT","","","+14:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Kosrae","KOST","KOST","","","+11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Kwajalein","MHT","MHT","","","+12:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Majuro","MHT","MHT","","","+12:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Marquesas","MART","MART","","","-09:30:00","+00:00:00","","","","+00:00:00"
"Pacific/Midway","SST","SST","","","-11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Nauru","NRT","NRT","","","+12:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Niue","NUT","NUT","","","-11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Norfolk","NFT","NFT","","","+11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Noumea","NCT","NCT","","","+11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Pago_Pago","SST","SST","","","-11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Palau","PWT","PWT","","","+09:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Pitcairn","PST","PST","","","-08:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Pohnpei","PONT","PONT","","","+11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Ponape","PONT","PONT","","","+11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Port_Moresby","PGT","PGT","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Rarotonga","CKT","CKT","","","-10:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Saipan","ChST","ChST","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Samoa","SST","SST","","","-11:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Tahiti","TAHT","TAHT","","","-10:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Tarawa","GILT","GILT","","","+12:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Tongatapu","TOT","TOT","","","+13:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Truk","CHUT","CHUT","","","+10:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Wake","WAKT","WAKT","","","+12:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Wallis","WFT","WFT","","","+12:00:00","+00:00:00","","","","+00:00:00"
"Pacific/Yap","CHUT","CHUT","","","+10:00:00","+00:00:00","","","","+00:00:00"
1 ID STD ABBR STD NAME DST ABBR DST NAME GMT offset DST adjustment DST Start Date rule Start time DST End date rule End time
2 Africa/Abidjan GMT GMT +00:00:00 +00:00:00 +00:00:00
3 Africa/Accra GMT GMT +00:00:00 +00:00:00 +00:00:00
4 Africa/Addis_Ababa EAT EAT +03:00:00 +00:00:00 +00:00:00
5 Africa/Algiers CET CET +01:00:00 +00:00:00 +00:00:00
6 Africa/Asmara EAT EAT +03:00:00 +00:00:00 +00:00:00
7 Africa/Asmera EAT EAT +03:00:00 +00:00:00 +00:00:00
8 Africa/Bamako GMT GMT +00:00:00 +00:00:00 +00:00:00
9 Africa/Bangui WAT WAT +01:00:00 +00:00:00 +00:00:00
10 Africa/Banjul GMT GMT +00:00:00 +00:00:00 +00:00:00
11 Africa/Bissau GMT GMT +00:00:00 +00:00:00 +00:00:00
12 Africa/Blantyre CAT CAT +02:00:00 +00:00:00 +00:00:00
13 Africa/Brazzaville WAT WAT +01:00:00 +00:00:00 +00:00:00
14 Africa/Bujumbura CAT CAT +02:00:00 +00:00:00 +00:00:00
15 Africa/Cairo EET EET +02:00:00 +00:00:00 +00:00:00
16 Africa/Casablanca WET WET WEST WEST +00:00:00 +01:00:00 2;0;7 +02:00:00 -1;0;10 +03:00:00
17 Africa/Ceuta CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
18 Africa/Conakry GMT GMT +00:00:00 +00:00:00 +00:00:00
19 Africa/Dakar GMT GMT +00:00:00 +00:00:00 +00:00:00
20 Africa/Dar_es_Salaam EAT EAT +03:00:00 +00:00:00 +00:00:00
21 Africa/Djibouti EAT EAT +03:00:00 +00:00:00 +00:00:00
22 Africa/Douala WAT WAT +01:00:00 +00:00:00 +00:00:00
23 Africa/El_Aaiun WET WET WEST WEST +00:00:00 +01:00:00 2;0;7 +02:00:00 -1;0;10 +03:00:00
24 Africa/Freetown GMT GMT +00:00:00 +00:00:00 +00:00:00
25 Africa/Gaborone CAT CAT +02:00:00 +00:00:00 +00:00:00
26 Africa/Harare CAT CAT +02:00:00 +00:00:00 +00:00:00
27 Africa/Johannesburg SAST SAST +02:00:00 +00:00:00 +00:00:00
28 Africa/Juba EAT EAT +03:00:00 +00:00:00 +00:00:00
29 Africa/Kampala EAT EAT +03:00:00 +00:00:00 +00:00:00
30 Africa/Khartoum EAT EAT +03:00:00 +00:00:00 +00:00:00
31 Africa/Kigali CAT CAT +02:00:00 +00:00:00 +00:00:00
32 Africa/Kinshasa WAT WAT +01:00:00 +00:00:00 +00:00:00
33 Africa/Lagos WAT WAT +01:00:00 +00:00:00 +00:00:00
34 Africa/Libreville WAT WAT +01:00:00 +00:00:00 +00:00:00
35 Africa/Lome GMT GMT +00:00:00 +00:00:00 +00:00:00
36 Africa/Luanda WAT WAT +01:00:00 +00:00:00 +00:00:00
37 Africa/Lubumbashi CAT CAT +02:00:00 +00:00:00 +00:00:00
38 Africa/Lusaka CAT CAT +02:00:00 +00:00:00 +00:00:00
39 Africa/Malabo WAT WAT +01:00:00 +00:00:00 +00:00:00
40 Africa/Maputo CAT CAT +02:00:00 +00:00:00 +00:00:00
41 Africa/Maseru SAST SAST +02:00:00 +00:00:00 +00:00:00
42 Africa/Mbabane SAST SAST +02:00:00 +00:00:00 +00:00:00
43 Africa/Mogadishu EAT EAT +03:00:00 +00:00:00 +00:00:00
44 Africa/Monrovia GMT GMT +00:00:00 +00:00:00 +00:00:00
45 Africa/Nairobi EAT EAT +03:00:00 +00:00:00 +00:00:00
46 Africa/Ndjamena WAT WAT +01:00:00 +00:00:00 +00:00:00
47 Africa/Niamey WAT WAT +01:00:00 +00:00:00 +00:00:00
48 Africa/Nouakchott GMT GMT +00:00:00 +00:00:00 +00:00:00
49 Africa/Ouagadougou GMT GMT +00:00:00 +00:00:00 +00:00:00
50 Africa/Porto-Novo WAT WAT +01:00:00 +00:00:00 +00:00:00
51 Africa/Porto_Novo WAT WAT +01:00:00 +00:00:00 +00:00:00
52 Africa/Sao_Tome GMT GMT +00:00:00 +00:00:00 +00:00:00
53 Africa/Timbuktu GMT GMT +00:00:00 +00:00:00 +00:00:00
54 Africa/Tripoli EET EET +02:00:00 +00:00:00 +00:00:00
55 Africa/Tunis CET CET +01:00:00 +00:00:00 +00:00:00
56 Africa/Windhoek WAT WAT WAST WAST +01:00:00 +01:00:00 1;0;9 +02:00:00 1;0;4 +02:00:00
57 America/Adak HST HST HDT HDT -10:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
58 America/Anchorage AKST AKST AKDT AKDT -09:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
59 America/Anguilla AST AST -04:00:00 +00:00:00 +00:00:00
60 America/Antigua AST AST -04:00:00 +00:00:00 +00:00:00
61 America/Araguaina BRT BRT -03:00:00 +00:00:00 +00:00:00
62 America/Argentina/Buenos_Aires ART ART -03:00:00 +00:00:00 +00:00:00
63 America/Argentina/Catamarca ART ART -03:00:00 +00:00:00 +00:00:00
64 America/Argentina/ComodRivadavia ART ART -03:00:00 +00:00:00 +00:00:00
65 America/Argentina/Cordoba ART ART -03:00:00 +00:00:00 +00:00:00
66 America/Argentina/Jujuy ART ART -03:00:00 +00:00:00 +00:00:00
67 America/Argentina/La_Rioja ART ART -03:00:00 +00:00:00 +00:00:00
68 America/Argentina/Mendoza ART ART -03:00:00 +00:00:00 +00:00:00
69 America/Argentina/Rio_Gallegos ART ART -03:00:00 +00:00:00 +00:00:00
70 America/Argentina/Salta ART ART -03:00:00 +00:00:00 +00:00:00
71 America/Argentina/San_Juan ART ART -03:00:00 +00:00:00 +00:00:00
72 America/Argentina/San_Luis ART ART -03:00:00 +00:00:00 +00:00:00
73 America/Argentina/Tucuman ART ART -03:00:00 +00:00:00 +00:00:00
74 America/Argentina/Ushuaia ART ART -03:00:00 +00:00:00 +00:00:00
75 America/Aruba AST AST -04:00:00 +00:00:00 +00:00:00
76 America/Asuncion PYT PYT PYST PYST -04:00:00 +01:00:00 1;0;10 +00:00:00 -1;0;3 +00:00:00
77 America/Atikokan EST EST -05:00:00 +00:00:00 +00:00:00
78 America/Atka HST HST HDT HDT -10:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
79 America/Bahia BRT BRT -03:00:00 +00:00:00 +00:00:00
80 America/Bahia_Banderas CST CST CDT CDT -06:00:00 +01:00:00 1;0;4 +02:00:00 -1;0;10 +02:00:00
81 America/Barbados AST AST -04:00:00 +00:00:00 +00:00:00
82 America/Belem BRT BRT -03:00:00 +00:00:00 +00:00:00
83 America/Belize CST CST -06:00:00 +00:00:00 +00:00:00
84 America/Beulah CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
85 America/Blanc-Sablon AST AST -04:00:00 +00:00:00 +00:00:00
86 America/Blanc_Sablon AST AST -04:00:00 +00:00:00 +00:00:00
87 America/Boa_Vista AMT AMT -04:00:00 +00:00:00 +00:00:00
88 America/Bogota COT COT -05:00:00 +00:00:00 +00:00:00
89 America/Boise MST MST MDT MDT -07:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
90 America/Buenos_Aires ART ART -03:00:00 +00:00:00 +00:00:00
91 America/Cambridge_Bay MST MST MDT MDT -07:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
92 America/Campo_Grande AMT AMT AMST AMST -04:00:00 +01:00:00 3;0;10 +00:00:00 3;0;2 +00:00:00
93 America/Cancun EST EST -05:00:00 +00:00:00 +00:00:00
94 America/Caracas VET VET -04:30:00 +00:00:00 +00:00:00
95 America/Catamarca ART ART -03:00:00 +00:00:00 +00:00:00
96 America/Cayenne GFT GFT -03:00:00 +00:00:00 +00:00:00
97 America/Cayman EST EST -05:00:00 +00:00:00 +00:00:00
98 America/Center CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
99 America/Chicago CST Central Standard Time CDT Central Daylight Time -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
100 America/Chihuahua MST MST MDT MDT -07:00:00 +01:00:00 1;0;4 +02:00:00 -1;0;10 +02:00:00
101 America/ComodRivadavia ART ART -03:00:00 +00:00:00 +00:00:00
102 America/Coral_Harbour EST EST -05:00:00 +00:00:00 +00:00:00
103 America/Cordoba ART ART -03:00:00 +00:00:00 +00:00:00
104 America/Costa_Rica CST CST -06:00:00 +00:00:00 +00:00:00
105 America/Creston MST MST -07:00:00 +00:00:00 +00:00:00
106 America/Cuiaba AMT AMT AMST AMST -04:00:00 +01:00:00 3;0;10 +00:00:00 3;0;2 +00:00:00
107 America/Curacao AST AST -04:00:00 +00:00:00 +00:00:00
108 America/Danmarkshavn GMT GMT +00:00:00 +00:00:00 +00:00:00
109 America/Dawson PST PST PDT PDT -08:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
110 America/Dawson_Creek MST MST -07:00:00 +00:00:00 +00:00:00
111 America/Denver MST Mountain Standard Time MDT Mountain Daylight Time -07:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
112 America/Detroit EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
113 America/Dominica AST AST -04:00:00 +00:00:00 +00:00:00
114 America/Edmonton MST MST MDT MDT -07:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
115 America/Eirunepe ACT ACT -05:00:00 +00:00:00 +00:00:00
116 America/El_Salvador CST CST -06:00:00 +00:00:00 +00:00:00
117 America/Ensenada PST PST PDT PDT -08:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
118 America/Fortaleza BRT BRT -03:00:00 +00:00:00 +00:00:00
119 America/Fort_Wayne EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
120 America/Glace_Bay AST AST ADT ADT -04:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
121 America/Godthab WGT WGT WGST WGST -03:00:00 +01:00:00 -1;6;3 +22:00:00 -1;6;10 +23:00:00
122 America/Goose_Bay AST AST ADT ADT -04:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
123 America/Grand_Turk AST AST -04:00:00 +00:00:00 +00:00:00
124 America/Grenada AST AST -04:00:00 +00:00:00 +00:00:00
125 America/Guadeloupe AST AST -04:00:00 +00:00:00 +00:00:00
126 America/Guatemala CST CST -06:00:00 +00:00:00 +00:00:00
127 America/Guayaquil ECT ECT -05:00:00 +00:00:00 +00:00:00
128 America/Guyana GYT GYT -04:00:00 +00:00:00 +00:00:00
129 America/Halifax AST AST ADT ADT -04:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
130 America/Havana CST CST CDT CDT -05:00:00 +01:00:00 2;0;3 +00:00:00 1;0;11 +01:00:00
131 America/Hermosillo MST MST -07:00:00 +00:00:00 +00:00:00
132 America/Indiana/Indianapolis EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
133 America/Indiana/Knox CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
134 America/Indiana/Marengo EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
135 America/Indiana/Petersburg EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
136 America/Indiana/Tell_City CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
137 America/Indiana/Vevay EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
138 America/Indiana/Vincennes EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
139 America/Indiana/Winamac EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
140 America/Indianapolis EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
141 America/Inuvik MST MST MDT MDT -07:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
142 America/Iqaluit EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
143 America/Jamaica EST EST -05:00:00 +00:00:00 +00:00:00
144 America/Jujuy ART ART -03:00:00 +00:00:00 +00:00:00
145 America/Juneau AKST AKST AKDT AKDT -09:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
146 America/Kentucky/Louisville EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
147 America/Kentucky/Monticello EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
148 America/Knox CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
149 America/Knox_IN CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
150 America/Kralendijk AST AST -04:00:00 +00:00:00 +00:00:00
151 America/La_Paz BOT BOT -04:00:00 +00:00:00 +00:00:00
152 America/La_Rioja ART ART -03:00:00 +00:00:00 +00:00:00
153 America/Lima PET PET -05:00:00 +00:00:00 +00:00:00
154 America/Los_Angeles PST Pacific Standard Time PDT Pacific Daylight Time -08:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
155 America/Louisville EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
156 America/Lower_Princes AST AST -04:00:00 +00:00:00 +00:00:00
157 America/Maceio BRT BRT -03:00:00 +00:00:00 +00:00:00
158 America/Managua CST CST -06:00:00 +00:00:00 +00:00:00
159 America/Manaus AMT AMT -04:00:00 +00:00:00 +00:00:00
160 America/Marengo EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
161 America/Marigot AST AST -04:00:00 +00:00:00 +00:00:00
162 America/Martinique AST AST -04:00:00 +00:00:00 +00:00:00
163 America/Matamoros CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
164 America/Mazatlan MST MST MDT MDT -07:00:00 +01:00:00 1;0;4 +02:00:00 -1;0;10 +02:00:00
165 America/Mendoza ART ART -03:00:00 +00:00:00 +00:00:00
166 America/Menominee CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
167 America/Merida CST CST CDT CDT -06:00:00 +01:00:00 1;0;4 +02:00:00 -1;0;10 +02:00:00
168 America/Metlakatla AKST AKST AKDT AKDT -09:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
169 America/Mexico_City CST CST CDT CDT -06:00:00 +01:00:00 1;0;4 +02:00:00 -1;0;10 +02:00:00
170 America/Miquelon PMST PMST PMDT PMDT -03:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
171 America/Moncton AST AST ADT ADT -04:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
172 America/Monterrey CST CST CDT CDT -06:00:00 +01:00:00 1;0;4 +02:00:00 -1;0;10 +02:00:00
173 America/Montevideo UYT UYT -03:00:00 +00:00:00 +00:00:00
174 America/Monticello EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
175 America/Montreal EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
176 America/Montserrat AST AST -04:00:00 +00:00:00 +00:00:00
177 America/Nassau EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
178 America/New_Salem CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
179 America/New_York EST Eastern Standard Time EDT Eastern Daylight Time -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
180 America/Nipigon EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
181 America/Nome AKST AKST AKDT AKDT -09:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
182 America/Noronha FNT FNT -02:00:00 +00:00:00 +00:00:00
183 America/North_Dakota/Beulah CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
184 America/North_Dakota/Center CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
185 America/North_Dakota/New_Salem CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
186 America/Ojinaga MST MST MDT MDT -07:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
187 America/Panama EST EST -05:00:00 +00:00:00 +00:00:00
188 America/Pangnirtung EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
189 America/Paramaribo SRT SRT -03:00:00 +00:00:00 +00:00:00
190 America/Petersburg EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
191 America/Phoenix MST Mountain Standard Time -07:00:00 +00:00:00 +00:00:00
192 America/Port-au-Prince EST EST -05:00:00 +00:00:00 +00:00:00
193 America/Porto_Acre ACT ACT -05:00:00 +00:00:00 +00:00:00
194 America/Porto_Velho AMT AMT -04:00:00 +00:00:00 +00:00:00
195 America/Port_au_Prince EST EST -05:00:00 +00:00:00 +00:00:00
196 America/Port_of_Spain AST AST -04:00:00 +00:00:00 +00:00:00
197 America/Puerto_Rico AST AST -04:00:00 +00:00:00 +00:00:00
198 America/Rainy_River CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
199 America/Rankin_Inlet CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
200 America/Recife BRT BRT -03:00:00 +00:00:00 +00:00:00
201 America/Regina CST CST -06:00:00 +00:00:00 +00:00:00
202 America/Resolute CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
203 America/Rio_Branco ACT ACT -05:00:00 +00:00:00 +00:00:00
204 America/Rio_Gallegos ART ART -03:00:00 +00:00:00 +00:00:00
205 America/Rosario ART ART -03:00:00 +00:00:00 +00:00:00
206 America/Salta ART ART -03:00:00 +00:00:00 +00:00:00
207 America/Santarem BRT BRT -03:00:00 +00:00:00 +00:00:00
208 America/Santa_Isabel PST PST PDT PDT -08:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
209 America/Santiago CLT CLT CLST CLST -04:00:00 +01:00:00 2;0;8 +00:00:00 3;0;5 +00:00:00
210 America/Santo_Domingo AST AST -04:00:00 +00:00:00 +00:00:00
211 America/San_Juan ART ART -03:00:00 +00:00:00 +00:00:00
212 America/San_Luis ART ART -03:00:00 +00:00:00 +00:00:00
213 America/Sao_Paulo BRT BRT BRST BRST -03:00:00 +01:00:00 3;0;10 +00:00:00 3;0;2 +00:00:00
214 America/Scoresbysund EGT EGT EGST EGST -01:00:00 +01:00:00 -1;0;3 +00:00:00 -1;0;10 +01:00:00
215 America/Shiprock MST MST MDT MDT -07:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
216 America/Sitka AKST AKST AKDT AKDT -09:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
217 America/St_Barthelemy AST AST -04:00:00 +00:00:00 +00:00:00
218 America/St_Johns NST NST NDT NDT -03:30:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
219 America/St_Kitts AST AST -04:00:00 +00:00:00 +00:00:00
220 America/St_Lucia AST AST -04:00:00 +00:00:00 +00:00:00
221 America/St_Thomas AST AST -04:00:00 +00:00:00 +00:00:00
222 America/St_Vincent AST AST -04:00:00 +00:00:00 +00:00:00
223 America/Swift_Current CST CST -06:00:00 +00:00:00 +00:00:00
224 America/Tegucigalpa CST CST -06:00:00 +00:00:00 +00:00:00
225 America/Tell_City CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
226 America/Thule AST AST ADT ADT -04:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
227 America/Thunder_Bay EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
228 America/Tijuana PST PST PDT PDT -08:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
229 America/Toronto EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
230 America/Tortola AST AST -04:00:00 +00:00:00 +00:00:00
231 America/Tucuman ART ART -03:00:00 +00:00:00 +00:00:00
232 America/Ushuaia ART ART -03:00:00 +00:00:00 +00:00:00
233 America/Vancouver PST PST PDT PDT -08:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
234 America/Vevay EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
235 America/Vincennes EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
236 America/Virgin AST AST -04:00:00 +00:00:00 +00:00:00
237 America/Whitehorse PST PST PDT PDT -08:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
238 America/Winamac EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
239 America/Winnipeg CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
240 America/Yakutat AKST AKST AKDT AKDT -09:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
241 America/Yellowknife MST MST MDT MDT -07:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
242 Antarctica/Casey AWST AWST +08:00:00 +00:00:00 +00:00:00
243 Antarctica/Davis DAVT DAVT +07:00:00 +00:00:00 +00:00:00
244 Antarctica/DumontDUrville DDUT DDUT +10:00:00 +00:00:00 +00:00:00
245 Antarctica/Macquarie MIST MIST +11:00:00 +00:00:00 +00:00:00
246 Antarctica/Mawson MAWT MAWT +05:00:00 +00:00:00 +00:00:00
247 Antarctica/McMurdo NZST NZST NZDT NZDT +12:00:00 +01:00:00 -1;0;9 +02:00:00 1;0;4 +03:00:00
248 Antarctica/Palmer CLT CLT CLST CLST -04:00:00 +01:00:00 2;0;8 +00:00:00 3;0;5 +00:00:00
249 Antarctica/Rothera ROTT ROTT -03:00:00 +00:00:00 +00:00:00
250 Antarctica/South_Pole NZST NZST NZDT NZDT +12:00:00 +01:00:00 -1;0;9 +02:00:00 1;0;4 +03:00:00
251 Antarctica/Syowa SYOT SYOT +03:00:00 +00:00:00 +00:00:00
252 Antarctica/Troll UTC UTC CEST CEST +00:00:00 +02:00:00 -1;0;3 +01:00:00 -1;0;10 +03:00:00
253 Antarctica/Vostok VOST VOST +06:00:00 +00:00:00 +00:00:00
254 Arctic/Longyearbyen CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
255 Asia/Aden AST AST +03:00:00 +00:00:00 +00:00:00
256 Asia/Almaty ALMT ALMT +06:00:00 +00:00:00 +00:00:00
257 Asia/Amman EET EET EEST EEST +02:00:00 +01:00:00 1;5;4 +00:00:00 -1;5;10 +01:00:00
258 Asia/Anadyr ANAT ANAT +12:00:00 +00:00:00 +00:00:00
259 Asia/Aqtau AQTT AQTT +05:00:00 +00:00:00 +00:00:00
260 Asia/Aqtobe AQTT AQTT +05:00:00 +00:00:00 +00:00:00
261 Asia/Ashgabat TMT TMT +05:00:00 +00:00:00 +00:00:00
262 Asia/Ashkhabad TMT TMT +05:00:00 +00:00:00 +00:00:00
263 Asia/Baghdad AST AST +03:00:00 +00:00:00 +00:00:00
264 Asia/Bahrain AST AST +03:00:00 +00:00:00 +00:00:00
265 Asia/Baku AZT AZT +04:00:00 +00:00:00 +00:00:00
266 Asia/Bangkok ICT ICT +07:00:00 +00:00:00 +00:00:00
267 Asia/Beirut EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +00:00:00 -1;0;10 +00:00:00
268 Asia/Bishkek KGT KGT +06:00:00 +00:00:00 +00:00:00
269 Asia/Brunei BNT BNT +08:00:00 +00:00:00 +00:00:00
270 Asia/Calcutta IST IST +05:30:00 +00:00:00 +00:00:00
271 Asia/Chita YAKT YAKT +09:00:00 +00:00:00 +00:00:00
272 Asia/Choibalsan CHOT CHOT CHOST CHOST +08:00:00 +01:00:00 -1;6;3 +02:00:00 -1;6;9 +00:00:00
273 Asia/Chongqing CST CST +08:00:00 +00:00:00 +00:00:00
274 Asia/Chungking CST CST +08:00:00 +00:00:00 +00:00:00
275 Asia/Colombo IST IST +05:30:00 +00:00:00 +00:00:00
276 Asia/Dacca BDT BDT +06:00:00 +00:00:00 +00:00:00
277 Asia/Damascus EET EET EEST EEST +02:00:00 +01:00:00 -1;5;3 +00:00:00 -1;5;10 +00:00:00
278 Asia/Dhaka BDT BDT +06:00:00 +00:00:00 +00:00:00
279 Asia/Dili TLT TLT +09:00:00 +00:00:00 +00:00:00
280 Asia/Dubai GST GST +04:00:00 +00:00:00 +00:00:00
281 Asia/Dushanbe TJT TJT +05:00:00 +00:00:00 +00:00:00
282 Asia/Gaza EET EET EEST EEST +02:00:00 +01:00:00 -1;6;3 +01:00:00 3;5;10 +00:00:00
283 Asia/Harbin CST CST +08:00:00 +00:00:00 +00:00:00
284 Asia/Hebron EET EET EEST EEST +02:00:00 +01:00:00 -1;6;3 +01:00:00 3;5;10 +00:00:00
285 Asia/Hong_Kong HKT HKT +08:00:00 +00:00:00 +00:00:00
286 Asia/Hovd HOVT HOVT HOVST HOVST +07:00:00 +01:00:00 -1;6;3 +02:00:00 -1;6;9 +00:00:00
287 Asia/Ho_Chi_Minh ICT ICT +07:00:00 +00:00:00 +00:00:00
288 Asia/Irkutsk IRKT IRKT +08:00:00 +00:00:00 +00:00:00
289 Asia/Istanbul EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
290 Asia/Jakarta WIB WIB +07:00:00 +00:00:00 +00:00:00
291 Asia/Jayapura WIT WIT +09:00:00 +00:00:00 +00:00:00
292 Asia/Jerusalem IST IST IDT IDT +02:00:00 +01:00:00 -1;5;3 +02:00:00 -1;0;10 +02:00:00
293 Asia/Kabul AFT AFT +04:30:00 +00:00:00 +00:00:00
294 Asia/Kamchatka PETT PETT +12:00:00 +00:00:00 +00:00:00
295 Asia/Karachi PKT PKT +05:00:00 +00:00:00 +00:00:00
296 Asia/Kashgar XJT XJT +06:00:00 +00:00:00 +00:00:00
297 Asia/Kathmandu NPT NPT +05:45:00 +00:00:00 +00:00:00
298 Asia/Katmandu NPT NPT +05:45:00 +00:00:00 +00:00:00
299 Asia/Khandyga YAKT YAKT +09:00:00 +00:00:00 +00:00:00
300 Asia/Kolkata IST IST +05:30:00 +00:00:00 +00:00:00
301 Asia/Krasnoyarsk KRAT KRAT +07:00:00 +00:00:00 +00:00:00
302 Asia/Kuala_Lumpur MYT MYT +08:00:00 +00:00:00 +00:00:00
303 Asia/Kuching MYT MYT +08:00:00 +00:00:00 +00:00:00
304 Asia/Kuwait AST AST +03:00:00 +00:00:00 +00:00:00
305 Asia/Macao CST CST +08:00:00 +00:00:00 +00:00:00
306 Asia/Macau CST CST +08:00:00 +00:00:00 +00:00:00
307 Asia/Magadan MAGT MAGT +10:00:00 +00:00:00 +00:00:00
308 Asia/Makassar WITA WITA +08:00:00 +00:00:00 +00:00:00
309 Asia/Manila PHT PHT +08:00:00 +00:00:00 +00:00:00
310 Asia/Muscat GST GST +04:00:00 +00:00:00 +00:00:00
311 Asia/Nicosia EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
312 Asia/Novokuznetsk KRAT KRAT +07:00:00 +00:00:00 +00:00:00
313 Asia/Novosibirsk NOVT NOVT +06:00:00 +00:00:00 +00:00:00
314 Asia/Omsk OMST OMST +06:00:00 +00:00:00 +00:00:00
315 Asia/Oral ORAT ORAT +05:00:00 +00:00:00 +00:00:00
316 Asia/Phnom_Penh ICT ICT +07:00:00 +00:00:00 +00:00:00
317 Asia/Pontianak WIB WIB +07:00:00 +00:00:00 +00:00:00
318 Asia/Pyongyang KST KST +08:30:00 +00:00:00 +00:00:00
319 Asia/Qatar AST AST +03:00:00 +00:00:00 +00:00:00
320 Asia/Qyzylorda QYZT QYZT +06:00:00 +00:00:00 +00:00:00
321 Asia/Rangoon MMT MMT +06:30:00 +00:00:00 +00:00:00
322 Asia/Riyadh AST AST +03:00:00 +00:00:00 +00:00:00
323 Asia/Saigon ICT ICT +07:00:00 +00:00:00 +00:00:00
324 Asia/Sakhalin SAKT SAKT +11:00:00 +00:00:00 +00:00:00
325 Asia/Samarkand UZT UZT +05:00:00 +00:00:00 +00:00:00
326 Asia/Seoul KST KST +09:00:00 +00:00:00 +00:00:00
327 Asia/Shanghai CST CST +08:00:00 +00:00:00 +00:00:00
328 Asia/Singapore SGT SGT +08:00:00 +00:00:00 +00:00:00
329 Asia/Srednekolymsk SRET SRET +11:00:00 +00:00:00 +00:00:00
330 Asia/Taipei CST CST +08:00:00 +00:00:00 +00:00:00
331 Asia/Tashkent UZT UZT +05:00:00 +00:00:00 +00:00:00
332 Asia/Tbilisi GET GET +04:00:00 +00:00:00 +00:00:00
333 Asia/Tehran IRST IRST IRDT IRDT +03:30:00 +01:00:00 3;1;3 +00:00:00 3;3;9 +00:00:00
334 Asia/Tel_Aviv IST IST IDT IDT +02:00:00 +01:00:00 -1;5;3 +02:00:00 -1;0;10 +02:00:00
335 Asia/Thimbu BTT BTT +06:00:00 +00:00:00 +00:00:00
336 Asia/Thimphu BTT BTT +06:00:00 +00:00:00 +00:00:00
337 Asia/Tokyo JST JST +09:00:00 +00:00:00 +00:00:00
338 Asia/Ujung_Pandang WITA WITA +08:00:00 +00:00:00 +00:00:00
339 Asia/Ulaanbaatar ULAT ULAT ULAST ULAST +08:00:00 +01:00:00 -1;6;3 +02:00:00 -1;6;9 +00:00:00
340 Asia/Ulan_Bator ULAT ULAT ULAST ULAST +08:00:00 +01:00:00 -1;6;3 +02:00:00 -1;6;9 +00:00:00
341 Asia/Urumqi XJT XJT +06:00:00 +00:00:00 +00:00:00
342 Asia/Ust-Nera VLAT VLAT +10:00:00 +00:00:00 +00:00:00
343 Asia/Ust_Nera VLAT VLAT +10:00:00 +00:00:00 +00:00:00
344 Asia/Vientiane ICT ICT +07:00:00 +00:00:00 +00:00:00
345 Asia/Vladivostok VLAT VLAT +10:00:00 +00:00:00 +00:00:00
346 Asia/Yakutsk YAKT YAKT +09:00:00 +00:00:00 +00:00:00
347 Asia/Yekaterinburg YEKT YEKT +05:00:00 +00:00:00 +00:00:00
348 Asia/Yerevan AMT AMT +04:00:00 +00:00:00 +00:00:00
349 Atlantic/Azores AZOT AZOT AZOST AZOST -01:00:00 +01:00:00 -1;0;3 +00:00:00 -1;0;10 +01:00:00
350 Atlantic/Bermuda AST AST ADT ADT -04:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
351 Atlantic/Canary WET WET WEST WEST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
352 Atlantic/Cape_Verde CVT CVT -01:00:00 +00:00:00 +00:00:00
353 Atlantic/Faeroe WET WET WEST WEST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
354 Atlantic/Faroe WET WET WEST WEST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
355 Atlantic/Jan_Mayen CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
356 Atlantic/Madeira WET WET WEST WEST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
357 Atlantic/Reykjavik GMT GMT +00:00:00 +00:00:00 +00:00:00
358 Atlantic/South_Georgia GST GST -02:00:00 +00:00:00 +00:00:00
359 Atlantic/Stanley FKST FKST -03:00:00 +00:00:00 +00:00:00
360 Atlantic/St_Helena GMT GMT +00:00:00 +00:00:00 +00:00:00
361 Australia/ACT AEST AEST AEDT AEDT +10:00:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
362 Australia/Adelaide ACST ACST ACDT ACDT +09:30:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
363 Australia/Brisbane AEST AEST +10:00:00 +00:00:00 +00:00:00
364 Australia/Broken_Hill ACST ACST ACDT ACDT +09:30:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
365 Australia/Canberra AEST AEST AEDT AEDT +10:00:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
366 Australia/Currie AEST AEST AEDT AEDT +10:00:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
367 Australia/Darwin ACST ACST +09:30:00 +00:00:00 +00:00:00
368 Australia/Eucla ACWST ACWST +08:45:00 +00:00:00 +00:00:00
369 Australia/Hobart AEST AEST AEDT AEDT +10:00:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
370 Australia/LHI LHST LHST LHDT LHDT +10:30:00 +00:30:00 1;0;10 +02:00:00 1;0;4 +02:00:00
371 Australia/Lindeman AEST AEST +10:00:00 +00:00:00 +00:00:00
372 Australia/Lord_Howe LHST LHST LHDT LHDT +10:30:00 +00:30:00 1;0;10 +02:00:00 1;0;4 +02:00:00
373 Australia/Melbourne AEST AEST AEDT AEDT +10:00:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
374 Australia/North ACST ACST +09:30:00 +00:00:00 +00:00:00
375 Australia/NSW AEST AEST AEDT AEDT +10:00:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
376 Australia/Perth AWST AWST +08:00:00 +00:00:00 +00:00:00
377 Australia/Queensland AEST AEST +10:00:00 +00:00:00 +00:00:00
378 Australia/South ACST ACST ACDT ACDT +09:30:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
379 Australia/Sydney AEST AEST AEDT AEDT +10:00:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
380 Australia/Tasmania AEST AEST AEDT AEDT +10:00:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
381 Australia/Victoria AEST AEST AEDT AEDT +10:00:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
382 Australia/West AWST AWST +08:00:00 +00:00:00 +00:00:00
383 Australia/Yancowinna ACST ACST ACDT ACDT +09:30:00 +01:00:00 1;0;10 +02:00:00 1;0;4 +03:00:00
384 Brazil/Acre ACT ACT -05:00:00 +00:00:00 +00:00:00
385 Brazil/DeNoronha FNT FNT -02:00:00 +00:00:00 +00:00:00
386 Brazil/East BRT BRT BRST BRST -03:00:00 +01:00:00 3;0;10 +00:00:00 3;0;2 +00:00:00
387 Brazil/West AMT AMT -04:00:00 +00:00:00 +00:00:00
388 Canada/Atlantic AST AST ADT ADT -04:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
389 Canada/Central CST CST CDT CDT -06:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
390 Canada/East-Saskatchewan CST CST -06:00:00 +00:00:00 +00:00:00
391 Canada/Eastern EST EST EDT EDT -05:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
392 Canada/East_Saskatchewan CST CST -06:00:00 +00:00:00 +00:00:00
393 Canada/Mountain MST MST MDT MDT -07:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
394 Canada/Newfoundland NST NST NDT NDT -03:30:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
395 Canada/Pacific PST PST PDT PDT -08:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
396 Canada/Saskatchewan CST CST -06:00:00 +00:00:00 +00:00:00
397 Canada/Yukon PST PST PDT PDT -08:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
398 Chile/Continental CLT CLT CLST CLST -04:00:00 +01:00:00 2;0;8 +00:00:00 3;0;5 +00:00:00
399 Chile/EasterIsland EAST EAST EASST EASST -06:00:00 +01:00:00 2;6;8 +22:00:00 2;6;5 +22:00:00
400 Etc/GMT GMT GMT +00:00:00 +00:00:00 +00:00:00
401 Etc/Greenwich GMT GMT +00:00:00 +00:00:00 +00:00:00
402 Etc/UCT UCT UCT +00:00:00 +00:00:00 +00:00:00
403 Etc/Universal UTC UTC +00:00:00 +00:00:00 +00:00:00
404 Etc/UTC UTC UTC +00:00:00 +00:00:00 +00:00:00
405 Etc/Zulu UTC UTC +00:00:00 +00:00:00 +00:00:00
406 Europe/Amsterdam CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
407 Europe/Andorra CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
408 Europe/Athens EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
409 Europe/Belfast GMT GMT BST BST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
410 Europe/Belgrade CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
411 Europe/Berlin CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
412 Europe/Bratislava CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
413 Europe/Brussels CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
414 Europe/Bucharest EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
415 Europe/Budapest CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
416 Europe/Busingen CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
417 Europe/Chisinau EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
418 Europe/Copenhagen CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
419 Europe/Dublin GMT GMT IST IST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
420 Europe/Gibraltar CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
421 Europe/Guernsey GMT GMT BST BST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
422 Europe/Helsinki EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
423 Europe/Isle_of_Man GMT GMT BST BST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
424 Europe/Istanbul EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
425 Europe/Jersey GMT GMT BST BST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
426 Europe/Kaliningrad EET EET +02:00:00 +00:00:00 +00:00:00
427 Europe/Kiev EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
428 Europe/Lisbon WET WET WEST WEST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
429 Europe/Ljubljana CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
430 Europe/London GMT GMT BST BST +00:00:00 +01:00:00 -1;0;3 +01:00:00 -1;0;10 +02:00:00
431 Europe/Luxembourg CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
432 Europe/Madrid CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
433 Europe/Malta CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
434 Europe/Mariehamn EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
435 Europe/Minsk MSK MSK +03:00:00 +00:00:00 +00:00:00
436 Europe/Monaco CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
437 Europe/Moscow MSK MSK +03:00:00 +00:00:00 +00:00:00
438 Europe/Nicosia EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
439 Europe/Oslo CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
440 Europe/Paris CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
441 Europe/Podgorica CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
442 Europe/Prague CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
443 Europe/Riga EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
444 Europe/Rome CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
445 Europe/Samara SAMT SAMT +04:00:00 +00:00:00 +00:00:00
446 Europe/San_Marino CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
447 Europe/Sarajevo CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
448 Europe/Simferopol MSK MSK +03:00:00 +00:00:00 +00:00:00
449 Europe/Skopje CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
450 Europe/Sofia EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
451 Europe/Stockholm CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
452 Europe/Tallinn EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
453 Europe/Tirane CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
454 Europe/Tiraspol EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
455 Europe/Uzhgorod EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
456 Europe/Vaduz CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
457 Europe/Vatican CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
458 Europe/Vienna CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
459 Europe/Vilnius EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
460 Europe/Volgograd MSK MSK +03:00:00 +00:00:00 +00:00:00
461 Europe/Warsaw CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
462 Europe/Zagreb CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
463 Europe/Zaporozhye EET EET EEST EEST +02:00:00 +01:00:00 -1;0;3 +03:00:00 -1;0;10 +04:00:00
464 Europe/Zurich CET CET CEST CEST +01:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00
465 Indian/Antananarivo EAT EAT +03:00:00 +00:00:00 +00:00:00
466 Indian/Chagos IOT IOT +06:00:00 +00:00:00 +00:00:00
467 Indian/Christmas CXT CXT +07:00:00 +00:00:00 +00:00:00
468 Indian/Cocos CCT CCT +06:30:00 +00:00:00 +00:00:00
469 Indian/Comoro EAT EAT +03:00:00 +00:00:00 +00:00:00
470 Indian/Kerguelen TFT TFT +05:00:00 +00:00:00 +00:00:00
471 Indian/Mahe SCT SCT +04:00:00 +00:00:00 +00:00:00
472 Indian/Maldives MVT MVT +05:00:00 +00:00:00 +00:00:00
473 Indian/Mauritius MUT MUT +04:00:00 +00:00:00 +00:00:00
474 Indian/Mayotte EAT EAT +03:00:00 +00:00:00 +00:00:00
475 Indian/Reunion RET RET +04:00:00 +00:00:00 +00:00:00
476 Mexico/BajaNorte PST PST PDT PDT -08:00:00 +01:00:00 2;0;3 +02:00:00 1;0;11 +02:00:00
477 Mexico/BajaSur MST MST MDT MDT -07:00:00 +01:00:00 1;0;4 +02:00:00 -1;0;10 +02:00:00
478 Mexico/General CST CST CDT CDT -06:00:00 +01:00:00 1;0;4 +02:00:00 -1;0;10 +02:00:00
479 Pacific/Apia WSST WSST WSDT WSDT +13:00:00 +01:00:00 -1;0;9 +03:00:00 1;0;4 +04:00:00
480 Pacific/Auckland NZST NZST NZDT NZDT +12:00:00 +01:00:00 -1;0;9 +02:00:00 1;0;4 +03:00:00
481 Pacific/Chatham CHAST CHAST CHADT CHADT +12:45:00 +01:00:00 -1;0;9 +02:00:00 1;0;4 +03:00:00
482 Pacific/Chuuk CHUT CHUT +10:00:00 +00:00:00 +00:00:00
483 Pacific/Easter EAST EAST EASST EASST -06:00:00 +01:00:00 2;6;8 +22:00:00 2;6;5 +22:00:00
484 Pacific/Efate VUT VUT +11:00:00 +00:00:00 +00:00:00
485 Pacific/Enderbury PHOT PHOT +13:00:00 +00:00:00 +00:00:00
486 Pacific/Fakaofo TKT TKT +13:00:00 +00:00:00 +00:00:00
487 Pacific/Fiji FJT FJT FJST FJST +12:00:00 +01:00:00 1;0;11 +02:00:00 3;0;1 +03:00:00
488 Pacific/Funafuti TVT TVT +12:00:00 +00:00:00 +00:00:00
489 Pacific/Galapagos GALT GALT -06:00:00 +00:00:00 +00:00:00
490 Pacific/Gambier GAMT GAMT -09:00:00 +00:00:00 +00:00:00
491 Pacific/Guadalcanal SBT SBT +11:00:00 +00:00:00 +00:00:00
492 Pacific/Guam ChST ChST +10:00:00 +00:00:00 +00:00:00
493 Pacific/Honolulu HST HST -10:00:00 +00:00:00 +00:00:00
494 Pacific/Johnston HST HST -10:00:00 +00:00:00 +00:00:00
495 Pacific/Kiritimati LINT LINT +14:00:00 +00:00:00 +00:00:00
496 Pacific/Kosrae KOST KOST +11:00:00 +00:00:00 +00:00:00
497 Pacific/Kwajalein MHT MHT +12:00:00 +00:00:00 +00:00:00
498 Pacific/Majuro MHT MHT +12:00:00 +00:00:00 +00:00:00
499 Pacific/Marquesas MART MART -09:30:00 +00:00:00 +00:00:00
500 Pacific/Midway SST SST -11:00:00 +00:00:00 +00:00:00
501 Pacific/Nauru NRT NRT +12:00:00 +00:00:00 +00:00:00
502 Pacific/Niue NUT NUT -11:00:00 +00:00:00 +00:00:00
503 Pacific/Norfolk NFT NFT +11:00:00 +00:00:00 +00:00:00
504 Pacific/Noumea NCT NCT +11:00:00 +00:00:00 +00:00:00
505 Pacific/Pago_Pago SST SST -11:00:00 +00:00:00 +00:00:00
506 Pacific/Palau PWT PWT +09:00:00 +00:00:00 +00:00:00
507 Pacific/Pitcairn PST PST -08:00:00 +00:00:00 +00:00:00
508 Pacific/Pohnpei PONT PONT +11:00:00 +00:00:00 +00:00:00
509 Pacific/Ponape PONT PONT +11:00:00 +00:00:00 +00:00:00
510 Pacific/Port_Moresby PGT PGT +10:00:00 +00:00:00 +00:00:00
511 Pacific/Rarotonga CKT CKT -10:00:00 +00:00:00 +00:00:00
512 Pacific/Saipan ChST ChST +10:00:00 +00:00:00 +00:00:00
513 Pacific/Samoa SST SST -11:00:00 +00:00:00 +00:00:00
514 Pacific/Tahiti TAHT TAHT -10:00:00 +00:00:00 +00:00:00
515 Pacific/Tarawa GILT GILT +12:00:00 +00:00:00 +00:00:00
516 Pacific/Tongatapu TOT TOT +13:00:00 +00:00:00 +00:00:00
517 Pacific/Truk CHUT CHUT +10:00:00 +00:00:00 +00:00:00
518 Pacific/Wake WAKT WAKT +12:00:00 +00:00:00 +00:00:00
519 Pacific/Wallis WFT WFT +12:00:00 +00:00:00 +00:00:00
520 Pacific/Yap CHUT CHUT +10:00:00 +00:00:00 +00:00:00

View File

@@ -0,0 +1,16 @@
# Copyright (c) 2016 Rene Rivera
#
# 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)
###############################################################################
alias boostdoc
: ../xmldoc/date_time.xml
:
: <dependency>../xmldoc//date_time_autodoc <dependency>../xmldoc//gregorian_autodoc
<dependency>../xmldoc//posix_time_autodoc <dependency>../xmldoc//local_time_autodoc
: ;
explicit boostdoc ;
alias boostrelease ;
explicit boostrelease ;

View File

@@ -0,0 +1,13 @@
<html>
<head>
<meta http-equiv="refresh" content="0; URL=../../../doc/html/date_time.html">
</head>
<body>
Automatic redirection failed, please go to
<a href="../../../doc/html/date_time.html">../../../doc/html/date_time.html</a>
<p><EFBFBD> Copyright CrystalClear Software, Inc 2003-2006</p>
<p> Use, modification, and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">
www.boost.org/LICENSE_1_0.txt</a>)</p>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,47 @@
project libs/date_time/example ;
exe dates_as_strings : gregorian/dates_as_strings.cpp ;
exe days_alive : gregorian/days_alive.cpp ;
exe days_till_new_year : gregorian/days_till_new_year.cpp ;
exe days_between_new_years : gregorian/days_between_new_years.cpp ;
exe find_last_day_of_months : gregorian/find_last_day_of_months.cpp ;
exe month_add : gregorian/month_add.cpp ;
exe localization : gregorian/localization.cpp ;
exe print_holidays : gregorian/print_holidays.cpp ;
exe print_month : gregorian/print_month.cpp ;
exe period_calc : gregorian/period_calc.cpp ;
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
;
exe print_hours : posix_time/print_hours.cpp
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
;
exe time_math : posix_time/time_math.cpp
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
;
exe time_periods : posix_time/time_periods.cpp
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
;
exe simple_time_zone : local_time/simple_time_zone.cpp ;
exe calc_rules : local_time/calc_rules.cpp ;
exe seconds_since_epoch : local_time/seconds_since_epoch.cpp ;
exe flight : local_time/flight.cpp ;
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
# http://www.boost.org/LICENSE_1_0.txt)

View File

@@ -0,0 +1,20 @@
# Copyright (c) 2002-2006 CrystalClear Software, Inc.
# 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)
#
project
: requirements <library>../../build/boost_date_time
;
exe dates_as_strings : dates_as_strings.cpp ;
exe end_of_month_day : end_of_month_day.cpp ;
exe period_calc : period_calc.cpp ;
exe days_alive : days_alive.cpp ;
exe print_holidays : print_holidays.cpp ;
exe days_since_year_start : days_since_year_start.cpp ;
exe print_month : print_month.cpp ;
exe days_till_new_year : days_till_new_year.cpp ;
exe date_localization : localization.cpp ;

View File

@@ -0,0 +1,127 @@
#include "boost/date_time/gregorian/gregorian.hpp"
#include "boost/date_time/gregorian/greg_serialize.hpp"
#include "boost/serialization/set.hpp"
#include "boost/serialization/list.hpp"
#include "boost/archive/text_oarchive.hpp"
#include "boost/archive/text_iarchive.hpp"
#include <iostream>
#include <fstream>
using namespace boost::gregorian;
typedef std::set<date> date_set;
typedef std::list<date> date_list;
void print(std::ostream& os, const date_set& ds)
{
os << "******** Date Set *********" << std::endl;
date_set::const_iterator itr = ds.begin();
while (itr != ds.end())
{
os << (*itr) << " ";
itr++;
}
os << "\n***************************" << std::endl;
}
class foo {
public:
foo(date d = date(not_a_date_time),
int i = 0) :
my_date(d),
my_int(i)
{}
void insert_date(date d)
{
my_dates.push_back(d);
}
void print(std::ostream& os) const
{
os << "foo= my_date is: " << my_date
<< " my_int is: " << my_int;
date_list::const_iterator i = my_dates.begin();
os << " Important dates: ";
while (i != my_dates.end()) {
os << (*i) << " ";
i++;
}
os << std::endl;
}
private:
friend class boost::serialization::access;
// is a type of input archive the & operator is defined similar to >>.
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & my_date;
ar & my_int;
ar & my_dates;
}
date my_date;
int my_int;
date_list my_dates;
};
int
main()
{
try {
date d(2004, Apr, 5);
std::cout << "Date: " << to_iso_string(d) << std::endl;
std::cout << "Date: " << d << std::endl;
std::ofstream ofs("date_demo.txt");
boost::archive::text_oarchive oa(ofs);
oa << d;
std::cout << "Construct a foo" << std::endl;
foo f(d, 1);
f.insert_date(d+days(1));
f.insert_date(d+days(2));
f.insert_date(d+days(3));
f.print(std::cout);
oa << f;
date_set dates;
dates.insert(date(2004, Apr,1));
dates.insert(date(2004, Apr,10));
dates.insert(date(2004, Apr,15));
print(std::cout, dates);
oa << dates;
ofs.close();
std::cout << "Now do the input streaming" << std::endl;
date d2(not_a_date_time);
std::ifstream ifs("date_demo.txt");
boost::archive::text_iarchive ia(ifs);
ia >> d2;
std::cout << "New date is: " << d2 << std::endl;
foo f2;
ia >> f2;
f2.print(std::cout);
date_set dates2;
ia >> dates2; //exception here
print(std::cout, dates2);
}
catch(std::exception& e) {
std::cout << "Caught Exception: " << e.what() << std::endl;
}
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,63 @@
/* The following is a simple example that shows conversion of dates
* to and from a std::string.
*
* Expected output:
* 2001-Oct-09
* 2001-10-09
* Tuesday October 9, 2001
* An expected exception is next:
* Exception: Month number is out of range 1..12
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>
#include <string>
int
main()
{
using namespace boost::gregorian;
try {
// The following date is in ISO 8601 extended format (CCYY-MM-DD)
std::string s("2001-10-9"); //2001-October-09
date d(from_simple_string(s));
std::cout << to_simple_string(d) << std::endl;
//Read ISO Standard(CCYYMMDD) and output ISO Extended
std::string ud("20011009"); //2001-Oct-09
date d1(from_undelimited_string(ud));
std::cout << to_iso_extended_string(d1) << std::endl;
//Output the parts of the date - Tuesday October 9, 2001
date::ymd_type ymd = d1.year_month_day();
greg_weekday wd = d1.day_of_week();
std::cout << wd.as_long_string() << " "
<< ymd.month.as_long_string() << " "
<< ymd.day << ", " << ymd.year
<< std::endl;
//Let's send in month 25 by accident and create an exception
std::string bad_date("20012509"); //2001-??-09
std::cout << "An expected exception is next: " << std::endl;
date wont_construct(from_undelimited_string(bad_date));
//use wont_construct so compiler doesn't complain, but you wont get here!
std::cout << "oh oh, you shouldn't reach this line: "
<< to_iso_string(wont_construct) << std::endl;
}
catch(std::exception& e) {
std::cout << " Exception: " << e.what() << std::endl;
}
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,47 @@
/* Short example that calculates the number of days since user was born.
* Demonstrates comparisons of durations, use of the day_clock,
* and parsing a date from a string.
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>
int
main()
{
using namespace boost::gregorian;
std::string s;
std::cout << "Enter birth day YYYY-MM-DD (eg: 2002-02-01): ";
std::cin >> s;
try {
date birthday(from_simple_string(s));
date today = day_clock::local_day();
days days_alive = today - birthday;
days one_day(1);
if (days_alive == one_day) {
std::cout << "Born yesterday, very funny" << std::endl;
}
else if (days_alive < days(0)) {
std::cout << "Not born yet, hmm: " << days_alive.days()
<< " days" <<std::endl;
}
else {
std::cout << "Days alive: " << days_alive.days() << std::endl;
}
}
catch(...) {
std::cout << "Bad date entered: " << s << std::endl;
}
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,38 @@
/* Provides a simple example of using a date_generator, and simple
* mathematical operatorations, to calculate the days since
* New Years day of this year, and days until next New Years day.
*
* Expected results:
* Adding together both durations will produce 365 (366 in a leap year).
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>
int
main()
{
using namespace boost::gregorian;
date today = day_clock::local_day();
partial_date new_years_day(1,Jan);
//Subtract two dates to get a duration
days days_since_year_start = today - new_years_day.get_date(today.year());
std::cout << "Days since Jan 1: " << days_since_year_start.days()
<< std::endl;
days days_until_year_start = new_years_day.get_date(today.year()+1) - today;
std::cout << "Days until next Jan 1: " << days_until_year_start.days()
<< std::endl;
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,25 @@
#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>
int
main()
{
using namespace boost::gregorian;
date today = day_clock::local_day();
//Subtract two dates to get a duration
date_duration days_since_year_start = today - date(today.year(),Jan,1);
std::cout << "Days since Jan 1: " << days_since_year_start.days()
<< std::endl;
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,26 @@
// This example displays the amount of time until new year's in days
#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>
int
main()
{
using namespace boost::gregorian;
date::ymd_type today = day_clock::local_day_ymd();
date new_years_day(today.year + 1,1,1);
date_duration dd = new_years_day - date(today);
std::cout << "Days till new year: " << dd.days() << std::endl;
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,46 @@
/* Simple program that uses the gregorian calendar to find the last
* day of the month and then display the last day of every month left
* in the year.
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>
int
main()
{
using namespace boost::gregorian;
std::cout << " Enter Year(ex: 2002): ";
int year, month;
std::cin >> year;
std::cout << " Enter Month(1..12): ";
std::cin >> month;
try {
int day = gregorian_calendar::end_of_month_day(year,month);
date end_of_month(year,month,day);
//Iterate thru by months --
month_iterator mitr(end_of_month,1);
date start_of_next_year(year+1, Jan, 1);
//loop thru the days and print each one
while (mitr < start_of_next_year){
std::cout << to_simple_string(*mitr) << std::endl;
++mitr;
}
}
catch(...) {
std::cout << "Invalid Date Entered" << std::endl;
}
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,54 @@
/* Simple program that finds the last day of the given month,
* then displays the last day of every month left in the given year.
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>
int
main()
{
using namespace boost::gregorian;
greg_year year(1400);
greg_month month(1);
// get a month and a year from the user
try {
greg_year::value_type y;
greg_month::value_type m;
std::cout << " Enter Year(ex: 2002): ";
std::cin >> y;
year = greg_year(y);
std::cout << " Enter Month(1..12): ";
std::cin >> m;
month = greg_month(m);
}
catch(const bad_year& by) {
std::cout << "Invalid Year Entered: " << by.what() << '\n'
<< "Using minimum values for month and year." << std::endl;
}
catch(const bad_month& bm) {
std::cout << "Invalid Month Entered" << bm.what() << '\n'
<< "Using minimum value for month. " << std::endl;
}
date start_of_next_year(year+1, Jan, 1);
date d(year, month, 1);
// add another month to d until we enter the next year.
while (d < start_of_next_year){
std::cout << to_simple_string(d.end_of_month()) << std::endl;
d += months(1);
}
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)
*/

View File

@@ -0,0 +1,100 @@
/* The following shows the creation of a facet for the output of
* dates in German (please forgive me for any errors in my German --
* I'm not a native speaker).
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>
#include <algorithm>
/* Define a series of char arrays for short and long name strings
* to be associated with German date output (US names will be
* retrieved from the locale). */
const char* const de_short_month_names[] =
{
"Jan", "Feb", "Mar", "Apr", "Mai", "Jun",
"Jul", "Aug", "Sep", "Okt", "Nov", "Dez", "NAM"
};
const char* const de_long_month_names[] =
{
"Januar", "Februar", "Marz", "April", "Mai",
"Juni", "Juli", "August", "September", "Oktober",
"November", "Dezember", "NichtDerMonat"
};
const char* const de_long_weekday_names[] =
{
"Sonntag", "Montag", "Dienstag", "Mittwoch",
"Donnerstag", "Freitag", "Samstag"
};
const char* const de_short_weekday_names[] =
{
"Son", "Mon", "Die","Mit", "Don", "Fre", "Sam"
};
int main()
{
using namespace boost::gregorian;
// create some gregorian objects to output
date d1(2002, Oct, 1);
greg_month m = d1.month();
greg_weekday wd = d1.day_of_week();
// create a facet and a locale for German dates
date_facet* german_facet = new date_facet();
std::cout.imbue(std::locale(std::locale::classic(), german_facet));
// create the German name collections
date_facet::input_collection_type short_months, long_months,
short_weekdays, long_weekdays;
std::copy(&de_short_month_names[0], &de_short_month_names[11],
std::back_inserter(short_months));
std::copy(&de_long_month_names[0], &de_long_month_names[11],
std::back_inserter(long_months));
std::copy(&de_short_weekday_names[0], &de_short_weekday_names[6],
std::back_inserter(short_weekdays));
std::copy(&de_long_weekday_names[0], &de_long_weekday_names[6],
std::back_inserter(long_weekdays));
// replace the default names with ours
// NOTE: date_generators and special_values were not replaced as
// they are not used in this example
german_facet->short_month_names(short_months);
german_facet->long_month_names(long_months);
german_facet->short_weekday_names(short_weekdays);
german_facet->long_weekday_names(long_weekdays);
// output the date in German using short month names
german_facet->format("%d.%m.%Y");
std::cout << d1 << std::endl; //01.10.2002
german_facet->month_format("%B");
std::cout << m << std::endl; //Oktober
german_facet->weekday_format("%A");
std::cout << wd << std::endl; //Dienstag
// Output the same gregorian objects using US names
date_facet* us_facet = new date_facet();
std::cout.imbue(std::locale(std::locale::classic(), us_facet));
us_facet->format("%m/%d/%Y");
std::cout << d1 << std::endl; // 10/01/2002
// English names, iso order (year-month-day), '-' separator
us_facet->format("%Y-%b-%d");
std::cout << d1 << std::endl; // 2002-Oct-01
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)
*/

View File

@@ -0,0 +1,58 @@
/* Simple program that uses the gregorian calendar to progress by exactly
* one month, regardless of how many days are in that month.
*
* This method can be used as an alternative to iterators
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>
int
main()
{
using namespace boost::gregorian;
date d = day_clock::local_day();
date d2 = d + months(1);
date d3 = d - months(1);
std::cout << "Today is: " << to_simple_string(d) << ".\n"
<< "One month from today will be: " << to_simple_string(d2) << ".\n"
<< "One month ago was: " << to_simple_string(d3)
<< std::endl;
std::cout << "******** Warning read this ***********************\n";
std::cout << "Be aware that adding a month is not exactly like regular numeric math.\n"
<< "Addition/Subtraction of months will 'snap to the end' of a month that\n"
<< "is shorter than the current month. For example consider "
<< "Jan 31, 2004 + (1 month)\n";
date d4(2004, Jan, 31);
date d5 = d4 + months(1);
std::cout << "Result is: " << to_simple_string(d5)
<< std::endl;
std::cout << "\nSo what does this mean? It means the result of adding months is order\n"
<< "dependent, non-commutative, and may create problems for applications.\n"
<< "Consider: \n"
<< "Jan 30, 2004 + (1 month) + (1 month) != Jan 30, 2004 + (2 months)\n"
<< "Why not? Because Jan 30, 2004 + 1 month is Feb 29 + 1 month is Mar 31st.\n"
<< "while Jan 30, 2004 + 2 months is Mar 30th.\n"
<< "All of this clears up as long as all the starting dates before the 28th of\n"
<< "the month -- then all the behavior follows classical mathematical rules.\n";
date d6(2004, Jan, 30);
date d7 = d6 + months(1) + months(1);
date d8 = d6 + months(2);
std::cout << "2004-01-30 + (1 month) + (1 month) is: " << to_simple_string(d7) << ".\n"
<< "2004-01-30 + (2 months) is: " << to_simple_string(d8)
<< 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)
*/

View File

@@ -0,0 +1,86 @@
/*
This example demonstrates a simple use of periods for the calculation
of date information.
The example calculates if a given date is a weekend or holiday
given an exclusion set. That is, each weekend or holiday is
entered into the set as a time interval. Then if a given date
is contained within any of the intervals it is considered to
be within the exclusion set and hence is a offtime.
Output:
Number Excluded Periods: 5
20020202/20020203
20020209/20020210
20020212/20020212
20020216/20020217
In Exclusion Period: 20020216 --> 20020216/20020217
20020223/20020224
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include <set>
#include <algorithm>
#include <iostream>
typedef std::set<boost::gregorian::date_period> date_period_set;
//Simple population of the exclusion set
date_period_set
generateExclusion()
{
using namespace boost::gregorian;
date_period periods_array[] =
{ date_period(date(2002,Feb,2), date(2002,Feb,4)),//weekend of 2nd-3rd
date_period(date(2002,Feb,9), date(2002,Feb,11)),
date_period(date(2002,Feb,16), date(2002,Feb,18)),
date_period(date(2002,Feb,23), date(2002,Feb,25)),
date_period(date(2002,Feb,12), date(2002,Feb,13))//a random holiday 2-12
};
const int num_periods = sizeof(periods_array)/sizeof(date_period);
date_period_set ps;
//insert the periods in the set
std::insert_iterator<date_period_set> itr(ps, ps.begin());
std::copy(periods_array, periods_array+num_periods, itr );
return ps;
}
int main()
{
using namespace boost::gregorian;
date_period_set ps = generateExclusion();
std::cout << "Number Excluded Periods: " << ps.size() << std::endl;
date d(2002,Feb,16);
date_period_set::const_iterator i = ps.begin();
//print the periods, check for containment
for (;i != ps.end(); i++) {
std::cout << to_iso_string(*i) << std::endl;
//if date is in exclusion period then print it
if (i->contains(d)) {
std::cout << "In Exclusion Period: "
<< to_iso_string(d) << " --> " << to_iso_string(*i)
<< std::endl;
}
}
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,83 @@
/* Generate a set of dates using a collection of date generators
* Output looks like:
* Enter Year: 2002
* 2002-Jan-01 [Tue]
* 2002-Jan-21 [Mon]
* 2002-Feb-12 [Tue]
* 2002-Jul-04 [Thu]
* 2002-Sep-02 [Mon]
* 2002-Nov-28 [Thu]
* 2002-Dec-25 [Wed]
* Number Holidays: 7
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include <algorithm>
#include <functional>
#include <vector>
#include <iostream>
#include <set>
void
print_date(boost::gregorian::date d)
{
using namespace boost::gregorian;
#if defined(BOOST_DATE_TIME_NO_LOCALE)
std::cout << to_simple_string(d) << " [" << d.day_of_week() << "]\n";
#else
std::cout << d << " [" << d.day_of_week() << "]\n";
#endif
}
int
main() {
using namespace boost::gregorian;
std::cout << "Enter Year: ";
greg_year::value_type year;
std::cin >> year;
//define a collection of holidays fixed by month and day
std::vector<year_based_generator*> holidays;
holidays.push_back(new partial_date(1,Jan)); //Western New Year
holidays.push_back(new partial_date(4,Jul)); //US Independence Day
holidays.push_back(new partial_date(25, Dec));//Christmas day
//define a shorthand for the nth_day_of_the_week_in_month function object
typedef nth_day_of_the_week_in_month nth_dow;
//US labor day
holidays.push_back(new nth_dow(nth_dow::first, Monday, Sep));
//MLK Day
holidays.push_back(new nth_dow(nth_dow::third, Monday, Jan));
//Pres day
holidays.push_back(new nth_dow(nth_dow::second, Tuesday, Feb));
//Thanksgiving
holidays.push_back(new nth_dow(nth_dow::fourth, Thursday, Nov));
typedef std::set<date> date_set;
date_set all_holidays;
for(std::vector<year_based_generator*>::iterator it = holidays.begin();
it != holidays.end(); ++it)
{
all_holidays.insert((*it)->get_date(year));
}
//print the holidays to the screen
std::for_each(all_holidays.begin(), all_holidays.end(), print_date);
std::cout << "Number Holidays: " << all_holidays.size() << std::endl;
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,64 @@
/* This example prints all the dates in a month. It demonstrates
* the use of iterators as well as functions of the gregorian_calendar
*
* Output:
* Enter Year: 2002
* Enter Month(1..12): 2
* 2002-Feb-01 [Fri]
* 2002-Feb-02 [Sat]
* 2002-Feb-03 [Sun]
* 2002-Feb-04 [Mon]
* 2002-Feb-05 [Tue]
* 2002-Feb-06 [Wed]
* 2002-Feb-07 [Thu]
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>
int
main()
{
using namespace boost::gregorian;
std::cout << "Enter Year: ";
greg_year::value_type year;
greg_month::value_type month;
std::cin >> year;
std::cout << "Enter Month(1..12): ";
std::cin >> month;
try {
//Use the calendar to get the last day of the month
greg_day::value_type eom_day = gregorian_calendar::end_of_month_day(year,month);
date endOfMonth(year,month,eom_day);
//construct an iterator starting with firt day of the month
day_iterator ditr(date(year,month,1));
//loop thru the days and print each one
for (; ditr <= endOfMonth; ++ditr) {
#if defined(BOOST_DATE_TIME_NO_LOCALE)
std::cout << to_simple_string(*ditr) << " ["
#else
std::cout << *ditr << " ["
#endif
<< ditr->day_of_week() << " week: "
<< ditr->week_number() << "]"
<< std::endl;
}
}
catch(std::exception& e) {
std::cout << "Error bad date, check your entry: \n"
<< " Details: " << e.what() << std::endl;
}
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,47 @@
/* A simple example for creating various dst_calc_rule instances
*/
#include "boost/date_time/gregorian/gregorian.hpp"
#include "boost/date_time/local_time/local_time.hpp"
#include <iostream>
int
main()
{
using namespace boost;
using namespace local_time;
using namespace gregorian;
/***** create the necessary date_generator objects *****/
// starting generators
first_day_of_the_week_in_month fd_start(Sunday, May);
last_day_of_the_week_in_month ld_start(Sunday, May);
nth_day_of_the_week_in_month nkd_start(nth_day_of_the_week_in_month::third,
Sunday, May);
partial_date pd_start(1, May);
// ending generators
first_day_of_the_week_in_month fd_end(Sunday, Oct);
last_day_of_the_week_in_month ld_end(Sunday, Oct);
nth_day_of_the_week_in_month nkd_end(nth_day_of_the_week_in_month::third,
Sunday, Oct);
partial_date pd_end(31, Oct);
/***** create the various dst_calc_rule objects *****/
dst_calc_rule_ptr pdr(new partial_date_dst_rule(pd_start, pd_end));
dst_calc_rule_ptr flr(new first_last_dst_rule(fd_start, ld_end));
dst_calc_rule_ptr llr(new last_last_dst_rule(ld_start, ld_end));
dst_calc_rule_ptr nlr(new nth_last_dst_rule(nkd_start, ld_end));
dst_calc_rule_ptr ndr(new nth_day_of_the_week_in_month_dst_rule(nkd_start, nkd_end));
std::cout << "Program run successfully" << 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)
*/

View File

@@ -0,0 +1,60 @@
#include "boost/date_time/local_time/local_time.hpp"
#include <iostream>
/* This example shows a program that calculates the arrival time of a plane
* that flys from Phoenix to New York. During the flight New York shifts
* into daylight savings time (Phoenix doesn't because Arizona doesn't use
* DST).
*
*
*/
int main()
{
using namespace boost::gregorian;
using namespace boost::local_time;
using namespace boost::posix_time;
//setup some timezones for creating and adjusting local times
//This user editable file can be found in libs/date_time/data.
tz_database tz_db;
try {
tz_db.load_from_file("../../data/date_time_zonespec.csv");
}catch(const data_not_accessible& dna) {
std::cerr << "Error with time zone data file: " << dna.what() << std::endl;
exit(EXIT_FAILURE);
}catch(const bad_field_count& bfc) {
std::cerr << "Error with time zone data file: " << bfc.what() << std::endl;
exit(EXIT_FAILURE);
}
time_zone_ptr nyc_tz = tz_db.time_zone_from_region("America/New_York");
//Use a newly created time zone rule
time_zone_ptr phx_tz(new posix_time_zone("MST-07:00:00"));
//local departure time in Phoenix is 11 pm on March 13 2010
// (NY changes to DST on March 14 at 2 am)
local_date_time phx_departure(date(2010, Mar, 13), hours(23),
phx_tz,
local_date_time::NOT_DATE_TIME_ON_ERROR);
local_date_time nyc_departure = phx_departure.local_time_in(nyc_tz);
time_duration flight_length = hours(4) + minutes(30);
local_date_time phx_arrival = phx_departure + flight_length;
local_date_time nyc_arrival = phx_arrival.local_time_in(nyc_tz);
std::cout << "departure PHX time: " << phx_departure << std::endl;
std::cout << "departure NYC time: " << nyc_departure << std::endl;
std::cout << "arrival PHX time: " << phx_arrival << std::endl;
std::cout << "arrival NYC time: " << nyc_arrival << std::endl;
}
/* Copyright 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)
*/

View File

@@ -0,0 +1,45 @@
#include "boost/date_time/gregorian/gregorian.hpp"
#include "boost/date_time/posix_time/posix_time.hpp"
#include "boost/date_time/local_time/local_time.hpp"
#include <iostream>
#include <locale>
int main() {
using namespace boost::gregorian;
using namespace boost::posix_time;
using namespace boost::local_time;
tz_database tz_db;
try {
tz_db.load_from_file("../../data/date_time_zonespec.csv");
}catch(data_not_accessible dna) {
std::cerr << "Error with time zone data file: " << dna.what() << std::endl;
exit(EXIT_FAILURE);
}catch(bad_field_count bfc) {
std::cerr << "Error with time zone data file: " << bfc.what() << std::endl;
exit(EXIT_FAILURE);
}
time_zone_ptr nyc = tz_db.time_zone_from_region("America/New_York");
local_date_time ny_time(date(2004, Aug, 30), hours(10), nyc, true);
typedef boost::date_time::time_facet<local_date_time, char> ldt_facet;
ldt_facet* timefacet = new ldt_facet("%Y-%b-%d %H:%M:%S""%F %Z");
std::locale loc(std::locale::classic(), timefacet);
std::cout << ny_time << std::endl;
// 2004-Aug-30 10:00:00 EDT
std::cout.imbue(loc);
std::cout << ny_time << std::endl;
// 2004-Aug-30 10:00:00 Eastern Daylight Time
return 0;
}
/* Copyright 2004-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)
*/

View File

@@ -0,0 +1,65 @@
/* This example demonstrates the use of the time zone database and
* local time to calculate the number of seconds since the UTC
* time_t epoch 1970-01-01 00:00:00. Note that the selected timezone
* could be any timezone supported in the time zone database file which
* can be modified and updated as needed by the user.
*
* To solve this problem the following steps are required:
* 1) Get a timezone from the tz database for the local time
* 2) Construct a local time using the timezone
* 3) Construct a posix_time::ptime for the time_t epoch time
* 4) Convert the local_time to utc and subtract the epoch time
*
*/
#include "boost/date_time/local_time/local_time.hpp"
#include <iostream>
int main()
{
using namespace boost::gregorian;
using namespace boost::local_time;
using namespace boost::posix_time;
tz_database tz_db;
try {
tz_db.load_from_file("../data/date_time_zonespec.csv");
}catch(const data_not_accessible& dna) {
std::cerr << "Error with time zone data file: " << dna.what() << std::endl;
exit(EXIT_FAILURE);
}catch(const bad_field_count& bfc) {
std::cerr << "Error with time zone data file: " << bfc.what() << std::endl;
exit(EXIT_FAILURE);
}
time_zone_ptr nyc_tz = tz_db.time_zone_from_region("America/New_York");
date in_date(2004,10,04);
time_duration td(12,14,32);
// construct with local time value
// create not-a-date-time if invalid (eg: in dst transition)
local_date_time nyc_time(in_date,
td,
nyc_tz,
local_date_time::NOT_DATE_TIME_ON_ERROR);
std::cout << nyc_time << std::endl;
ptime time_t_epoch(date(1970,1,1));
std::cout << time_t_epoch << std::endl;
// first convert nyc_time to utc via the utc_time()
// call and subtract the ptime.
time_duration diff = nyc_time.utc_time() - time_t_epoch;
//Expected 1096906472
std::cout << "Seconds diff: " << diff.total_seconds() << std::endl;
}
/* Copyright 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)
*/

View File

@@ -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)
*/

View File

@@ -0,0 +1,13 @@
# Copyright (c) 2002-2005 CrystalClear Software, Inc.
# 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)
project
: requirements <library>../../build/boost_date_time
;
exe time_math : time_math.cpp ;
exe local_utc_conversion : local_utc_conversion.cpp ;
exe print_hours : print_hours.cpp ;
exe time_periods : time_periods.cpp ;

View File

@@ -0,0 +1,90 @@
/* Demonstrate conversions between a local time and utc
* Output:
*
* UTC <--> New York while DST is NOT active (5 hours)
* 2001-Dec-31 19:00:00 in New York is 2002-Jan-01 00:00:00 UTC time
* 2002-Jan-01 00:00:00 UTC is 2001-Dec-31 19:00:00 New York time
*
* UTC <--> New York while DST is active (4 hours)
* 2002-May-31 20:00:00 in New York is 2002-Jun-01 00:00:00 UTC time
* 2002-Jun-01 00:00:00 UTC is 2002-May-31 20:00:00 New York time
*
* UTC <--> Arizona (7 hours)
* 2002-May-31 17:00:00 in Arizona is 2002-Jun-01 00:00:00 UTC time
*/
#include "boost/date_time/posix_time/posix_time.hpp"
#include "boost/date_time/local_time_adjustor.hpp"
#include "boost/date_time/c_local_time_adjustor.hpp"
#include <iostream>
int
main()
{
using namespace boost::posix_time;
using namespace boost::gregorian;
//This local adjustor depends on the machine TZ settings-- highly dangerous!
typedef boost::date_time::c_local_adjustor<ptime> local_adj;
ptime t10(date(2002,Jan,1), hours(7));
ptime t11 = local_adj::utc_to_local(t10);
std::cout << "UTC <--> Zone base on TZ setting" << std::endl;
std::cout << to_simple_string(t11) << " in your TZ is "
<< to_simple_string(t10) << " UTC time "
<< std::endl;
time_duration td = t11 - t10;
std::cout << "A difference of: "
<< to_simple_string(td) << std::endl;
//eastern timezone is utc-5
typedef boost::date_time::local_adjustor<ptime, -5, us_dst> us_eastern;
ptime t1(date(2001,Dec,31), hours(19)); //5 hours b/f midnight NY time
std::cout << "\nUTC <--> New York while DST is NOT active (5 hours)"
<< std::endl;
ptime t2 = us_eastern::local_to_utc(t1);
std::cout << to_simple_string(t1) << " in New York is "
<< to_simple_string(t2) << " UTC time "
<< std::endl;
ptime t3 = us_eastern::utc_to_local(t2);//back should be the same
std::cout << to_simple_string(t2) << " UTC is "
<< to_simple_string(t3) << " New York time "
<< "\n\n";
ptime t4(date(2002,May,31), hours(20)); //4 hours b/f midnight NY time
std::cout << "UTC <--> New York while DST is active (4 hours)" << std::endl;
ptime t5 = us_eastern::local_to_utc(t4);
std::cout << to_simple_string(t4) << " in New York is "
<< to_simple_string(t5) << " UTC time "
<< std::endl;
ptime t6 = us_eastern::utc_to_local(t5);//back should be the same
std::cout << to_simple_string(t5) << " UTC is "
<< to_simple_string(t6) << " New York time "
<< "\n" << std::endl;
//Arizona timezone is utc-7 with no dst
typedef boost::date_time::local_adjustor<ptime, -7, no_dst> us_arizona;
ptime t7(date(2002,May,31), hours(17));
std::cout << "UTC <--> Arizona (7 hours)" << std::endl;
ptime t8 = us_arizona::local_to_utc(t7);
std::cout << to_simple_string(t7) << " in Arizona is "
<< to_simple_string(t8) << " UTC time "
<< std::endl;
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,53 @@
/* Print the remaining hours of the day
* Uses the clock to get the local time
* Use an iterator to iterate over the remaining hours
* Retrieve the date part from a time
*
* Expected Output something like:
*
* 2002-Mar-08 16:30:59
* 2002-Mar-08 17:30:59
* 2002-Mar-08 18:30:59
* 2002-Mar-08 19:30:59
* 2002-Mar-08 20:30:59
* 2002-Mar-08 21:30:59
* 2002-Mar-08 22:30:59
* 2002-Mar-08 23:30:59
* Time left till midnight: 07:29:01
*/
#include "boost/date_time/posix_time/posix_time.hpp"
#include <iostream>
int
main()
{
using namespace boost::posix_time;
using namespace boost::gregorian;
//get the current time from the clock -- one second resolution
ptime now = second_clock::local_time();
//Get the date part out of the time
date today = now.date();
date tomorrow = today + days(1);
ptime tomorrow_start(tomorrow); //midnight
//iterator adds by one hour
time_iterator titr(now,hours(1));
for (; titr < tomorrow_start; ++titr) {
std::cout << to_simple_string(*titr) << std::endl;
}
time_duration remaining = tomorrow_start - now;
std::cout << "Time left till midnight: "
<< to_simple_string(remaining) << std::endl;
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,36 @@
/* Some simple examples of constructing and calculating with times
* Output:
* 2002-Feb-01 00:00:00 - 2002-Feb-01 05:04:02.001000000 = -5:04:02.001000000
*/
#include "boost/date_time/posix_time/posix_time.hpp"
#include <iostream>
int
main()
{
using namespace boost::posix_time;
using namespace boost::gregorian;
date d(2002,Feb,1); //an arbitrary date
//construct a time by adding up some durations
ptime t1(d, hours(5)+minutes(4)+seconds(2)+milliseconds(1));
//construct a new time by subtracting some times
ptime t2 = t1 - hours(5)- minutes(4)- seconds(2)- milliseconds(1);
//construct a duration by taking the difference between times
time_duration td = t2 - t1;
std::cout << to_simple_string(t2) << " - "
<< to_simple_string(t1) << " = "
<< to_simple_string(td) << std::endl;
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,58 @@
/* Some simple examples of constructing and calculating with times
* Returns:
* [2002-Feb-01 00:00:00/2002-Feb-01 23:59:59.999999999] contains 2002-Feb-01 03:00:05
* [2002-Feb-01 00:00:00/2002-Feb-01 23:59:59.999999999] intersected with
* [2002-Feb-01 00:00:00/2002-Feb-01 03:00:04.999999999] is
* [2002-Feb-01 00:00:00/2002-Feb-01 03:00:04.999999999]
*/
#include "boost/date_time/posix_time/posix_time.hpp"
#include <iostream>
using namespace boost::posix_time;
using namespace boost::gregorian;
//Create a simple period class to contain all the times in a day
class day_period : public time_period
{
public:
day_period(date d) : time_period(ptime(d),//midnight
ptime(d,hours(24)))
{}
};
int
main()
{
date d(2002,Feb,1); //an arbitrary date
//a period that represents a day
day_period dp(d);
ptime t(d, hours(3)+seconds(5)); //an arbitray time on that day
if (dp.contains(t)) {
std::cout << to_simple_string(dp) << " contains "
<< to_simple_string(t) << std::endl;
}
//a period that represents part of the day
time_period part_of_day(ptime(d, hours(0)), t);
//intersect the 2 periods and print the results
if (part_of_day.intersects(dp)) {
time_period result = part_of_day.intersection(dp);
std::cout << to_simple_string(dp) << " intersected with\n"
<< to_simple_string(part_of_day) << " is \n"
<< to_simple_string(result) << std::endl;
}
return 0;
}
/* Copyright 2001-2004: 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)
*/

View File

@@ -0,0 +1,194 @@
#include <iostream>
#include <boost/date_time/local_time/local_time.hpp>
int main(){
using namespace boost::gregorian;
using namespace boost::posix_time;
using namespace boost::local_time;
using namespace std;
/****** basic use ******/
date d(2004, Feb, 29);
time_duration td(12,34,56,789);
stringstream ss;
ss << d << ' ' << td;
ptime pt(not_a_date_time);
cout << pt << endl; // "not-a-date-time"
ss >> pt;
cout << pt << endl; // "2004-Feb-29 12:34:56.000789"
ss.str("");
ss << pt << " EDT-05EDT,M4.1.0,M10.5.0";
local_date_time ldt(not_a_date_time);
ss >> ldt;
cout << ldt << endl; // " 2004-Feb-29 12:34:56.000789 EDT"
/****** format strings ******/
local_time_facet* output_facet = new local_time_facet();
local_time_input_facet* input_facet = new local_time_input_facet();
ss.imbue(locale(locale::classic(), output_facet));
ss.imbue(locale(ss.getloc(), input_facet));
output_facet->format("%a %b %d, %H:%M %z");
ss.str("");
ss << ldt;
cout << ss.str() << endl; // "Sun Feb 29, 12:34 EDT"
output_facet->format(local_time_facet::iso_time_format_specifier);
ss.str("");
ss << ldt;
cout << ss.str() << endl; // "20040229T123456.000789-0500"
output_facet->format(local_time_facet::iso_time_format_extended_specifier);
ss.str("");
ss << ldt;
cout << ss.str() << endl; // "2004-02-29 12:34:56.000789-05:00"
// extra words in format
string my_format("The extended ordinal time %Y-%jT%H:%M can also be represented as %A %B %d, %Y");
output_facet->format(my_format.c_str());
input_facet->format(my_format.c_str());
ss.str("");
ss << ldt;
cout << ss.str() << endl;
// matching extra words in input
ss.str("The extended ordinal time 2005-128T12:15 can also be represented as Sunday May 08, 2005");
ss >> ldt;
cout << ldt << endl; // cout is using default format "2005-May-08 12:15:00 UTC"
/****** content strings ******/
// set up the collections of custom strings.
// only the full names are altered for the sake of brevity
string month_names[12] = { "january", "february", "march",
"april", "may", "june",
"july", "august", "september",
"october", "november", "december" };
vector<string> long_months(&month_names[0], &month_names[12]);
string day_names[7] = { "sunday", "monday", "tuesday", "wednesday",
"thursday", "friday", "saturday" };
vector<string> long_days(&day_names[0], &day_names[7]);
// create date_facet and date_input_facet using all defaults
date_facet* date_output = new date_facet();
date_input_facet* date_input = new date_input_facet();
ss.imbue(locale(ss.getloc(), date_output));
ss.imbue(locale(ss.getloc(), date_input));
// replace names in the output facet
date_output->long_month_names(long_months);
date_output->long_weekday_names(long_days);
// replace names in the input facet
date_input->long_month_names(long_months);
date_input->long_weekday_names(long_days);
// customize month, weekday and date formats
date_output->format("%Y-%B-%d");
date_input->format("%Y-%B-%d");
date_output->month_format("%B"); // full name
date_input->month_format("%B"); // full name
date_output->weekday_format("%A"); // full name
date_input->weekday_format("%A"); // full name
ss.str("");
ss << greg_month(3);
cout << ss.str() << endl; // "march"
ss.str("");
ss << greg_weekday(3);
cout << ss.str() << endl; // "tuesday"
ss.str("");
ss << date(2005,Jul,4);
cout << ss.str() << endl; // "2005-july-04"
/****** special values ******/
// reset the formats to defaults
output_facet->format(local_time_facet::default_time_format);
input_facet->format(local_time_input_facet::default_time_input_format);
// create custom special_values parser and formatter objects
// and add them to the facets
string sv[5] = {"nadt","neg_inf", "pos_inf", "min_dt", "max_dt" };
vector<string> sv_names(&sv[0], &sv[5]);
special_values_parser sv_parser(sv_names.begin(), sv_names.end());
special_values_formatter sv_formatter(sv_names.begin(), sv_names.end());
output_facet->special_values_formatter(sv_formatter);
input_facet->special_values_parser(sv_parser);
ss.str("");
ldt = local_date_time(not_a_date_time);
ss << ldt;
cout << ss.str() << endl; // "nadt"
ss.str("min_dt");
ss >> ldt;
ss.str("");
ss << ldt;
cout << ss.str() << endl; // "1400-Jan-01 00:00:00 UTC"
/****** date/time periods ******/
// reset all formats to defaults
date_output->format(date_facet::default_date_format);
date_input->format(date_facet::default_date_format);
date_output->month_format("%b"); // abbrev
date_input->month_format("%b"); // abbrev
date_output->weekday_format("%a"); // abbrev
date_input->weekday_format("%a"); // abbrev
// create our date_period
date_period dp(date(2005,Mar,1), days(31)); // month of march
// custom period formatter and parser
period_formatter per_formatter(period_formatter::AS_OPEN_RANGE,
" to ", "from ", " exclusive", " inclusive" );
period_parser per_parser(period_parser::AS_OPEN_RANGE,
" to ", "from ", " exclusive" , " inclusive" );
// default output
ss.str("");
ss << dp;
cout << ss.str() << endl; // "[2005-Mar-01/2005-Mar-31]"
// add out custom parser and formatter to the facets
date_output->period_formatter(per_formatter);
date_input->period_parser(per_parser);
// custom output
ss.str("");
ss << dp;
cout << ss.str() << endl; // "from 2005-Feb-01 to 2005-Apr-01 exclusive"
/****** date generators ******/
// custom date_generator phrases
string dg_phrases[9] = { "1st", "2nd", "3rd", "4th", "5th",
"final", "prior to", "following", "in" };
vector<string> phrases(&dg_phrases[0], &dg_phrases[9]);
// create our date_generator
first_day_of_the_week_before d_gen(Monday);
// default output
ss.str("");
ss << d_gen;
cout << ss.str() << endl; // "Mon before"
// add our custom strings to the date facets
date_output->date_gen_phrase_strings(phrases);
date_input->date_gen_element_strings(phrases);
// custom output
ss.str("");
ss << d_gen;
cout << ss.str() << endl; // "Mon prior to"
return 0;
}
/* Copyright 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)
*/

View File

@@ -0,0 +1,17 @@
#ifndef BOOST_DATE_TIME_ALL_HPP___
#define BOOST_DATE_TIME_ALL_HPP___
/* Copyright (c) 2006 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland
* $Date$
*/
// See www.boost.org/libs/date_time for documentation.
//gregorian and posix time included by indirectly
#include "boost/date_time/local_time/local_time.hpp"
#endif // BOOST_DATE_TIME_ALL_HPP___

View File

@@ -0,0 +1,164 @@
#ifndef _DATE_TIME_ADJUST_FUNCTORS_HPP___
#define _DATE_TIME_ADJUST_FUNCTORS_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/date.hpp"
#include "boost/date_time/wrapping_int.hpp"
namespace boost {
namespace date_time {
//! Functor to iterate a fixed number of days
template<class date_type>
class day_functor
{
public:
typedef typename date_type::duration_type duration_type;
day_functor(int f) : f_(f) {}
duration_type get_offset(const date_type&) const
{
return duration_type(f_);
}
duration_type get_neg_offset(const date_type&) const
{
return duration_type(-f_);
}
private:
int f_;
};
//! Provides calculation to find next nth month given a date
/*! This adjustment function provides the logic for 'month-based'
* advancement on a ymd based calendar. The policy it uses
* to handle the non existant end of month days is to back
* up to the last day of the month. Also, if the starting
* date is the last day of a month, this functor will attempt
* to adjust to the end of the month.
*/
template<class date_type>
class month_functor
{
public:
typedef typename date_type::duration_type duration_type;
typedef typename date_type::calendar_type cal_type;
typedef typename cal_type::ymd_type ymd_type;
typedef typename cal_type::day_type day_type;
month_functor(int f) : f_(f), origDayOfMonth_(0) {}
duration_type get_offset(const date_type& d) const
{
ymd_type ymd(d.year_month_day());
if (origDayOfMonth_ == 0) {
origDayOfMonth_ = ymd.day;
day_type endOfMonthDay(cal_type::end_of_month_day(ymd.year,ymd.month));
if (endOfMonthDay == ymd.day) {
origDayOfMonth_ = -1; //force the value to the end of month
}
}
typedef date_time::wrapping_int2<short,1,12> wrap_int2;
wrap_int2 wi(ymd.month);
//calc the year wrap around, add() returns 0 or 1 if wrapped
const typename ymd_type::year_type year(static_cast<typename ymd_type::year_type::value_type>(ymd.year + wi.add(f_)));
// std::cout << "trace wi: " << wi.as_int() << std::endl;
// std::cout << "trace year: " << year << std::endl;
//find the last day for the new month
day_type resultingEndOfMonthDay(cal_type::end_of_month_day(year, wi.as_int()));
//original was the end of month -- force to last day of month
if (origDayOfMonth_ == -1) {
return date_type(year, wi.as_int(), resultingEndOfMonthDay) - d;
}
day_type dayOfMonth = origDayOfMonth_;
if (dayOfMonth > resultingEndOfMonthDay) {
dayOfMonth = resultingEndOfMonthDay;
}
return date_type(year, wi.as_int(), dayOfMonth) - d;
}
//! Returns a negative duration_type
duration_type get_neg_offset(const date_type& d) const
{
ymd_type ymd(d.year_month_day());
if (origDayOfMonth_ == 0) {
origDayOfMonth_ = ymd.day;
day_type endOfMonthDay(cal_type::end_of_month_day(ymd.year,ymd.month));
if (endOfMonthDay == ymd.day) {
origDayOfMonth_ = -1; //force the value to the end of month
}
}
typedef date_time::wrapping_int2<short,1,12> wrap_int2;
wrap_int2 wi(ymd.month);
//calc the year wrap around, add() returns 0 or 1 if wrapped
const typename ymd_type::year_type year(static_cast<typename ymd_type::year_type::value_type>(ymd.year + wi.subtract(f_)));
//find the last day for the new month
day_type resultingEndOfMonthDay(cal_type::end_of_month_day(year, wi.as_int()));
//original was the end of month -- force to last day of month
if (origDayOfMonth_ == -1) {
return date_type(year, wi.as_int(), resultingEndOfMonthDay) - d;
}
day_type dayOfMonth = origDayOfMonth_;
if (dayOfMonth > resultingEndOfMonthDay) {
dayOfMonth = resultingEndOfMonthDay;
}
return date_type(year, wi.as_int(), dayOfMonth) - d;
}
private:
int f_;
mutable short origDayOfMonth_;
};
//! Functor to iterate a over weeks
template<class date_type>
class week_functor
{
public:
typedef typename date_type::duration_type duration_type;
typedef typename date_type::calendar_type calendar_type;
week_functor(int f) : f_(f) {}
duration_type get_offset(const date_type&) const
{
return duration_type(f_*static_cast<int>(calendar_type::days_in_week()));
}
duration_type get_neg_offset(const date_type&) const
{
return duration_type(-f_*static_cast<int>(calendar_type::days_in_week()));
}
private:
int f_;
};
//! Functor to iterate by a year adjusting for leap years
template<class date_type>
class year_functor
{
public:
//typedef typename date_type::year_type year_type;
typedef typename date_type::duration_type duration_type;
year_functor(int f) : _mf(f * 12) {}
duration_type get_offset(const date_type& d) const
{
return _mf.get_offset(d);
}
duration_type get_neg_offset(const date_type& d) const
{
return _mf.get_neg_offset(d);
}
private:
month_functor<date_type> _mf;
};
} }//namespace date_time
#endif

View File

@@ -0,0 +1,72 @@
#ifndef DATE_TIME_C_LOCAL_TIME_ADJUSTOR_HPP__
#define DATE_TIME_C_LOCAL_TIME_ADJUSTOR_HPP__
/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
/*! @file c_local_time_adjustor.hpp
Time adjustment calculations based on machine
*/
#include <stdexcept>
#include <boost/throw_exception.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/c_time.hpp>
#include <boost/numeric/conversion/cast.hpp>
namespace boost {
namespace date_time {
//! Adjust to / from utc using the C API
/*! Warning!!! This class assumes that timezone settings of the
* machine are correct. This can be a very dangerous assumption.
*/
template<class time_type>
class c_local_adjustor {
public:
typedef typename time_type::time_duration_type time_duration_type;
typedef typename time_type::date_type date_type;
typedef typename date_type::duration_type date_duration_type;
//! Convert a utc time to local time
static time_type utc_to_local(const time_type& t)
{
date_type time_t_start_day(1970,1,1);
time_type time_t_start_time(time_t_start_day,time_duration_type(0,0,0));
if (t < time_t_start_time) {
boost::throw_exception(std::out_of_range("Cannot convert dates prior to Jan 1, 1970"));
BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return time_t_start_time); // should never reach
}
date_duration_type dd = t.date() - time_t_start_day;
time_duration_type td = t.time_of_day();
uint64_t t2 = static_cast<uint64_t>(dd.days())*86400 +
static_cast<uint64_t>(td.hours())*3600 +
static_cast<uint64_t>(td.minutes())*60 +
td.seconds();
// detect y2038 issue and throw instead of proceed with bad time
std::time_t tv = boost::numeric_cast<std::time_t>(t2);
std::tm tms, *tms_ptr;
tms_ptr = c_time::localtime(&tv, &tms);
date_type d(static_cast<unsigned short>(tms_ptr->tm_year + 1900),
static_cast<unsigned short>(tms_ptr->tm_mon + 1),
static_cast<unsigned short>(tms_ptr->tm_mday));
time_duration_type td2(tms_ptr->tm_hour,
tms_ptr->tm_min,
tms_ptr->tm_sec,
t.time_of_day().fractional_seconds());
return time_type(d,td2);
}
};
} } //namespace date_time
#endif

View File

@@ -0,0 +1,128 @@
#ifndef DATE_TIME_C_TIME_HPP___
#define DATE_TIME_C_TIME_HPP___
/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
/*! @file c_time.hpp
Provide workarounds related to the ctime header
*/
#include <ctime>
#include <string> // to be able to convert from string literals to exceptions
#include <stdexcept>
#include <boost/throw_exception.hpp>
#include <boost/date_time/compiler_config.hpp>
//Work around libraries that don't put time_t and time in namespace std
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std { using ::time_t; using ::time; using ::localtime;
using ::tm; using ::gmtime; }
#endif // BOOST_NO_STDC_NAMESPACE
//The following is used to support high precision time clocks
#ifdef BOOST_HAS_GETTIMEOFDAY
#include <sys/time.h>
#endif
#ifdef BOOST_HAS_FTIME
#include <time.h>
#endif
namespace boost {
namespace date_time {
//! Provides a uniform interface to some 'ctime' functions
/*! Provides a uniform interface to some ctime functions and
* their '_r' counterparts. The '_r' functions require a pointer to a
* user created std::tm struct whereas the regular functions use a
* staticly created struct and return a pointer to that. These wrapper
* functions require the user to create a std::tm struct and send in a
* pointer to it. This struct may be used to store the resulting time.
* The returned pointer may or may not point to this struct, however,
* it will point to the result of the corresponding function.
* All functions do proper checking of the C function results and throw
* exceptions on error. Therefore the functions will never return NULL.
*/
struct c_time {
public:
#if defined(BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS)
//! requires a pointer to a user created std::tm struct
inline
static std::tm* localtime(const std::time_t* t, std::tm* result)
{
// localtime_r() not in namespace std???
#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
std::tm tmp;
if(!localtime_r(t,&tmp))
result = 0;
else
*result = tmp;
#else
result = localtime_r(t, result);
#endif
if (!result)
boost::throw_exception(std::runtime_error("could not convert calendar time to local time"));
return result;
}
//! requires a pointer to a user created std::tm struct
inline
static std::tm* gmtime(const std::time_t* t, std::tm* result)
{
// gmtime_r() not in namespace std???
#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
std::tm tmp;
if(!gmtime_r(t,&tmp))
result = 0;
else
*result = tmp;
#else
result = gmtime_r(t, result);
#endif
if (!result)
boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time"));
return result;
}
#else // BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS
#if defined(__clang__) // Clang has to be checked before MSVC
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400))
#pragma warning(push) // preserve warning settings
#pragma warning(disable : 4996) // disable depricated localtime/gmtime warning on vc8
#endif
//! requires a pointer to a user created std::tm struct
inline
static std::tm* localtime(const std::time_t* t, std::tm* result)
{
result = std::localtime(t);
if (!result)
boost::throw_exception(std::runtime_error("could not convert calendar time to local time"));
return result;
}
//! requires a pointer to a user created std::tm struct
inline
static std::tm* gmtime(const std::time_t* t, std::tm* result)
{
result = std::gmtime(t);
if (!result)
boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time"));
return result;
}
#if defined(__clang__) // Clang has to be checked before MSVC
#pragma clang diagnostic pop
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400))
#pragma warning(pop) // restore warnings to previous state
#endif
#endif // BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS
};
}} // namespaces
#endif // DATE_TIME_C_TIME_HPP___

View File

@@ -0,0 +1,137 @@
#ifndef DATE_TIME_COMPILER_CONFIG_HPP___
#define DATE_TIME_COMPILER_CONFIG_HPP___
/* Copyright (c) 2002-2004 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <cstdlib>
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
// This file performs some local compiler configurations
#include <boost/date_time/locale_config.hpp> //set up locale configurations
//Set up a configuration parameter for platforms that have
//GetTimeOfDay
#if defined(BOOST_HAS_GETTIMEOFDAY) || defined(BOOST_HAS_FTIME)
#define BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK
#endif
// To Force no default constructors for date & ptime, un-comment following
//#define DATE_TIME_NO_DEFAULT_CONSTRUCTOR
// Include extensions to date_duration - comment out to remove this feature
#define BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES
#if (defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) || BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT(0x581) ) )
#define BOOST_DATE_TIME_NO_MEMBER_INIT
#endif
// include these types before we try to re-define them
#include <boost/cstdint.hpp>
//Define INT64_C for compilers that don't have it
#if (!defined(INT64_C))
#define INT64_C(value) int64_t(value)
#endif
/* Workaround for Borland iterator error. Error was "Cannot convert 'istream *' to 'wistream *' in function istream_iterator<>::istream_iterator() */
#if defined(BOOST_BORLANDC) && defined(BOOST_BCB_WITH_RW_LIB)
#define BOOST_DATE_TIME_NO_WISTREAM_ITERATOR
#endif
// Borland v5.64 does not have the following in std namespace; v5.5.1 does
#if defined(BOOST_BORLANDC) && defined(BOOST_BCB_WITH_STLPORT)
#include <locale>
namespace std {
using stlport::tolower;
using stlport::ctype;
using stlport::use_facet;
}
#endif
// workaround for errors associated with output for date classes
// modifications and input streaming for time classes.
// Compilers affected are:
// gcc295, msvc (neither with STLPort), any borland
//
#if (((defined(__GNUC__) && (__GNUC__ < 3)) || \
(defined(_MSC_VER) && (_MSC_VER < 1300)) ) && \
!defined(_STLP_OWN_IOSTREAMS) ) || \
BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT(0x581) )
#define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS
#endif
// The macro marks up places where compiler complains for missing return statement or
// uninitialized variables after calling to boost::throw_exception.
// BOOST_UNREACHABLE_RETURN doesn't work since even compilers that support
// unreachable statements detection emit such warnings.
#if defined(_MSC_VER)
// Use special MSVC extension to markup unreachable code
# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) __assume(false)
#elif !defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION)
// Call to a non-returning function should suppress the warning
# if defined(BOOST_NO_STDC_NAMESPACE)
namespace std {
using ::abort;
}
# endif // defined(BOOST_NO_STDC_NAMESPACE)
# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) std::abort()
#else
// For other poor compilers the specified expression is compiled. Usually, this would be a return statement.
# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) x
#endif
/* The following handles the definition of the necessary macros
* for dll building on Win32 platforms.
*
* For code that will be placed in the date_time .dll,
* it must be properly prefixed with BOOST_DATE_TIME_DECL.
* The corresponding .cpp file must have BOOST_DATE_TIME_SOURCE
* defined before including its header. For examples see:
* greg_month.hpp & greg_month.cpp
*
*/
// we need to import/export our code only if the user has specifically
// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
// libraries to be dynamically linked, or BOOST_DATE_TIME_DYN_LINK
// if they want just this one to be dynamically liked:
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK)
// export if this is our own source, otherwise import:
# ifdef BOOST_DATE_TIME_SOURCE
# define BOOST_DATE_TIME_DECL BOOST_SYMBOL_EXPORT
# else
# define BOOST_DATE_TIME_DECL BOOST_SYMBOL_IMPORT
# endif // BOOST_DATE_TIME_SOURCE
#endif // DYN_LINK
//
// if BOOST_WHATEVER_DECL isn't defined yet define it now:
#ifndef BOOST_DATE_TIME_DECL
# define BOOST_DATE_TIME_DECL
#endif
#if defined(BOOST_HAS_THREADS)
# if defined(_MSC_VER) || defined(__MWERKS__) || defined(__MINGW32__) || defined(__BORLANDC__)
//no reentrant posix functions (eg: localtime_r)
# elif (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT)))
# define BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS
# endif
#endif
#if defined(BOOST_NO_CXX11_NULLPTR)
# define BOOST_DATE_TIME_NULLPTR 0
#else
# define BOOST_DATE_TIME_NULLPTR nullptr
#endif
#endif

View File

@@ -0,0 +1,129 @@
#ifndef CONSTRAINED_VALUE_HPP___
#define CONSTRAINED_VALUE_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland
* $Date$
*/
#include <exception>
#include <stdexcept>
#include <boost/config.hpp>
#include <boost/throw_exception.hpp>
#include <boost/type_traits/conditional.hpp>
#include <boost/type_traits/is_base_of.hpp>
namespace boost {
//! Namespace containing constrained_value template and types
namespace CV {
//! Represent a min or max violation type
enum violation_enum {min_violation, max_violation};
//! A template to specify a constrained basic value type
/*! This template provides a quick way to generate
* an integer type with a constrained range. The type
* provides for the ability to specify the min, max, and
* and error handling policy.
*
* <b>value policies</b>
* A class that provides the range limits via the min and
* max functions as well as a function on_error that
* determines how errors are handled. A common strategy
* would be to assert or throw and exception. The on_error
* is passed both the current value and the new value that
* is in error.
*
*/
template<class value_policies>
class BOOST_SYMBOL_VISIBLE constrained_value {
public:
typedef typename value_policies::value_type value_type;
// typedef except_type exception_type;
BOOST_CXX14_CONSTEXPR constrained_value(value_type value) : value_((min)())
{
assign(value);
}
BOOST_CXX14_CONSTEXPR constrained_value& operator=(value_type v)
{
assign(v);
return *this;
}
//! Return the max allowed value (traits method)
static BOOST_CONSTEXPR value_type
max BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::max)();}
//! Return the min allowed value (traits method)
static BOOST_CONSTEXPR value_type
min BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::min)();}
//! Coerce into the representation type
BOOST_CXX14_CONSTEXPR operator value_type() const {return value_;}
protected:
value_type value_;
private:
BOOST_CXX14_CONSTEXPR void assign(value_type value)
{
//adding 1 below gets rid of a compiler warning which occurs when the
//min_value is 0 and the type is unsigned....
if (value+1 < (min)()+1) {
value_policies::on_error(value_, value, min_violation);
return;
}
if (value > (max)()) {
value_policies::on_error(value_, value, max_violation);
return;
}
value_ = value;
}
};
//! Template to shortcut the constrained_value policy creation process
template<typename rep_type, rep_type min_value,
rep_type max_value, class exception_type>
class BOOST_SYMBOL_VISIBLE simple_exception_policy
{
struct BOOST_SYMBOL_VISIBLE exception_wrapper : public exception_type
{
// In order to support throw_exception mechanism in the BOOST_NO_EXCEPTIONS mode,
// we'll have to provide a way to acquire std::exception from the exception being thrown.
// However, we cannot derive from it, since it would make it interceptable by this class,
// which might not be what the user wanted.
operator std::out_of_range () const
{
// TODO: Make the message more descriptive by using arguments to on_error
return std::out_of_range("constrained value boundary has been violated");
}
};
typedef typename conditional<
is_base_of< std::exception, exception_type >::value,
exception_type,
exception_wrapper
>::type actual_exception_type;
public:
typedef rep_type value_type;
static BOOST_CONSTEXPR rep_type
min BOOST_PREVENT_MACRO_SUBSTITUTION () { return min_value; }
static BOOST_CONSTEXPR rep_type
max BOOST_PREVENT_MACRO_SUBSTITUTION () { return max_value; }
static void on_error(rep_type, rep_type, violation_enum)
{
boost::throw_exception(actual_exception_type());
}
};
} } //namespace CV
#endif

View File

@@ -0,0 +1,209 @@
#ifndef DATE_TIME_DATE_HPP___
#define DATE_TIME_DATE_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <boost/operators.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/year_month_day.hpp>
#include <boost/date_time/special_defs.hpp>
namespace boost {
namespace date_time {
//!Representation of timepoint at the one day level resolution.
/*!
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
and comparisons.
<b>Theory</b>
This date representation fundamentally departs from the C tm struct
approach. The goal for this type is to provide efficient date
operations (add, subtract) and storage (minimize space to represent)
in a concrete class. Thus, the date uses a count internally to
represent a particular date. The calendar parameter defines
the policies for converting the the year-month-day and internal
counted form here. Applications that need to perform heavy
formatting of the same date repeatedly will perform better
by using the year-month-day representation.
Internally the date uses a day number to represent the date.
This is a monotonic time representation. This representation
allows for fast comparison as well as simplifying
the creation of writing numeric operations. Essentially, the
internal day number is like adjusted julian day. The adjustment
is determined by the Epoch date which is represented as day 1 of
the calendar. Day 0 is reserved for negative infinity so that
any actual date is automatically greater than negative infinity.
When a date is constructed from a date or formatted for output,
the appropriate conversions are applied to create the year, month,
day representations.
*/
template<class T, class calendar, class duration_type_>
class BOOST_SYMBOL_VISIBLE date : private
boost::less_than_comparable<T
, boost::equality_comparable<T
> >
{
public:
typedef T date_type;
typedef calendar calendar_type;
typedef typename calendar::date_traits_type traits_type;
typedef duration_type_ duration_type;
typedef typename calendar::year_type year_type;
typedef typename calendar::month_type month_type;
typedef typename calendar::day_type day_type;
typedef typename calendar::ymd_type ymd_type;
typedef typename calendar::date_rep_type date_rep_type;
typedef typename calendar::date_int_type date_int_type;
typedef typename calendar::day_of_week_type day_of_week_type;
BOOST_CXX14_CONSTEXPR date(year_type y, month_type m, day_type d)
: days_(calendar::day_number(ymd_type(y, m, d)))
{}
BOOST_CXX14_CONSTEXPR date(const ymd_type& ymd)
: days_(calendar::day_number(ymd))
{}
//let the compiler write copy, assignment, and destructor
BOOST_CXX14_CONSTEXPR year_type year() const
{
ymd_type ymd = calendar::from_day_number(days_);
return ymd.year;
}
BOOST_CXX14_CONSTEXPR month_type month() const
{
ymd_type ymd = calendar::from_day_number(days_);
return ymd.month;
}
BOOST_CXX14_CONSTEXPR day_type day() const
{
ymd_type ymd = calendar::from_day_number(days_);
return ymd.day;
}
BOOST_CXX14_CONSTEXPR day_of_week_type day_of_week() const
{
ymd_type ymd = calendar::from_day_number(days_);
return calendar::day_of_week(ymd);
}
BOOST_CXX14_CONSTEXPR ymd_type year_month_day() const
{
return calendar::from_day_number(days_);
}
BOOST_CONSTEXPR bool operator<(const date_type& rhs) const
{
return days_ < rhs.days_;
}
BOOST_CONSTEXPR bool operator==(const date_type& rhs) const
{
return days_ == rhs.days_;
}
//! check to see if date is a special value
BOOST_CONSTEXPR bool is_special()const
{
return(is_not_a_date() || is_infinity());
}
//! check to see if date is not a value
BOOST_CONSTEXPR bool is_not_a_date() const
{
return traits_type::is_not_a_number(days_);
}
//! check to see if date is one of the infinity values
BOOST_CONSTEXPR bool is_infinity() const
{
return traits_type::is_inf(days_);
}
//! check to see if date is greater than all possible dates
BOOST_CONSTEXPR bool is_pos_infinity() const
{
return traits_type::is_pos_inf(days_);
}
//! check to see if date is greater than all possible dates
BOOST_CONSTEXPR bool is_neg_infinity() const
{
return traits_type::is_neg_inf(days_);
}
//! return as a special value or a not_special if a normal date
BOOST_CXX14_CONSTEXPR special_values as_special() const
{
return traits_type::to_special(days_);
}
BOOST_CXX14_CONSTEXPR duration_type operator-(const date_type& d) const
{
if (!this->is_special() && !d.is_special())
{
// The duration underlying type may be wider than the date underlying type.
// Thus we calculate the difference in terms of two durations from some common fixed base date.
typedef typename duration_type::duration_rep_type duration_rep_type;
return duration_type(static_cast< duration_rep_type >(days_) - static_cast< duration_rep_type >(d.days_));
}
else
{
// In this case the difference will be a special value, too
date_rep_type val = date_rep_type(days_) - date_rep_type(d.days_);
return duration_type(val.as_special());
}
}
BOOST_CXX14_CONSTEXPR date_type operator-(const duration_type& dd) const
{
if(dd.is_special())
{
return date_type(date_rep_type(days_) - dd.get_rep());
}
return date_type(date_rep_type(days_) - static_cast<date_int_type>(dd.days()));
}
BOOST_CXX14_CONSTEXPR date_type operator-=(const duration_type& dd)
{
*this = *this - dd;
return date_type(days_);
}
BOOST_CONSTEXPR date_rep_type day_count() const
{
return days_;
}
//allow internal access from operators
BOOST_CXX14_CONSTEXPR date_type operator+(const duration_type& dd) const
{
if(dd.is_special())
{
return date_type(date_rep_type(days_) + dd.get_rep());
}
return date_type(date_rep_type(days_) + static_cast<date_int_type>(dd.days()));
}
BOOST_CXX14_CONSTEXPR date_type operator+=(const duration_type& dd)
{
*this = *this + dd;
return date_type(days_);
}
//see reference
protected:
/*! This is a private constructor which allows for the creation of new
dates. It is not exposed to users since that would require class
users to understand the inner workings of the date class.
*/
BOOST_CONSTEXPR explicit date(date_int_type days) : days_(days) {}
BOOST_CXX14_CONSTEXPR explicit date(date_rep_type days) : days_(days.as_number()) {}
date_int_type days_;
};
} } // namespace date_time
#endif

View File

@@ -0,0 +1,77 @@
#ifndef DATE_CLOCK_DEVICE_HPP___
#define DATE_CLOCK_DEVICE_HPP___
/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/c_time.hpp"
namespace boost {
namespace date_time {
//! A clock providing day level services based on C time_t capabilities
/*! This clock uses Posix interfaces as its implementation and hence
* uses the timezone settings of the operating system. Incorrect
* user settings will result in incorrect results for the calls
* to local_day.
*/
template<class date_type>
class day_clock
{
public:
typedef typename date_type::ymd_type ymd_type;
//! Get the local day as a date type
static date_type local_day()
{
return date_type(local_day_ymd());
}
//! Get the local day as a ymd_type
static typename date_type::ymd_type local_day_ymd()
{
::std::tm result;
::std::tm* curr = get_local_time(result);
return ymd_type(static_cast<unsigned short>(curr->tm_year + 1900),
static_cast<unsigned short>(curr->tm_mon + 1),
static_cast<unsigned short>(curr->tm_mday));
}
//! Get the current day in universal date as a ymd_type
static typename date_type::ymd_type universal_day_ymd()
{
::std::tm result;
::std::tm* curr = get_universal_time(result);
return ymd_type(static_cast<unsigned short>(curr->tm_year + 1900),
static_cast<unsigned short>(curr->tm_mon + 1),
static_cast<unsigned short>(curr->tm_mday));
}
//! Get the UTC day as a date type
static date_type universal_day()
{
return date_type(universal_day_ymd());
}
private:
static ::std::tm* get_local_time(std::tm& result)
{
::std::time_t t;
::std::time(&t);
return c_time::localtime(&t, &result);
}
static ::std::tm* get_universal_time(std::tm& result)
{
::std::time_t t;
::std::time(&t);
return c_time::gmtime(&t, &result);
}
};
} } //namespace date_time
#endif

View File

@@ -0,0 +1,26 @@
#ifndef DATE_TIME_DATE_DEFS_HPP
#define DATE_TIME_DATE_DEFS_HPP
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland
* $Date$
*/
namespace boost {
namespace date_time {
//! An enumeration of weekday names
enum weekdays {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday};
//! Simple enum to allow for nice programming with Jan, Feb, etc
enum months_of_year {Jan=1,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,NotAMonth,NumMonths};
} } //namespace date_time
#endif

View File

@@ -0,0 +1,146 @@
#ifndef DATE_TIME_DATE_DURATION__
#define DATE_TIME_DATE_DURATION__
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <boost/operators.hpp>
#include <boost/date_time/special_defs.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/int_adapter.hpp>
namespace boost {
namespace date_time {
//! Duration type with date level resolution
template<class duration_rep_traits>
class BOOST_SYMBOL_VISIBLE date_duration : private
boost::less_than_comparable1< date_duration< duration_rep_traits >
, boost::equality_comparable1< date_duration< duration_rep_traits >
, boost::addable1< date_duration< duration_rep_traits >
, boost::subtractable1< date_duration< duration_rep_traits >
, boost::dividable2< date_duration< duration_rep_traits >, int
> > > > >
{
public:
typedef typename duration_rep_traits::int_type duration_rep_type;
typedef typename duration_rep_traits::impl_type duration_rep;
//! Construct from a day count
BOOST_CXX14_CONSTEXPR explicit date_duration(duration_rep day_count) : days_(day_count) {}
/*! construct from special_values - only works when
* instantiated with duration_traits_adapted */
BOOST_CXX14_CONSTEXPR date_duration(special_values sv) :
days_(duration_rep::from_special(sv))
{}
//! returns days_ as it's instantiated type - used for streaming
BOOST_CXX14_CONSTEXPR duration_rep get_rep()const
{
return days_;
}
BOOST_CXX14_CONSTEXPR special_values as_special() const
{
return days_.as_special();
}
BOOST_CXX14_CONSTEXPR bool is_special()const
{
return days_.is_special();
}
//! returns days as value, not object.
BOOST_CXX14_CONSTEXPR duration_rep_type days() const
{
return duration_rep_traits::as_number(days_);
}
//! Returns the smallest duration -- used by to calculate 'end'
static BOOST_CXX14_CONSTEXPR date_duration unit()
{
return date_duration<duration_rep_traits>(1);
}
//! Equality
BOOST_CXX14_CONSTEXPR bool operator==(const date_duration& rhs) const
{
return days_ == rhs.days_;
}
//! Less
BOOST_CXX14_CONSTEXPR bool operator<(const date_duration& rhs) const
{
return days_ < rhs.days_;
}
/* For shortcut operators (+=, -=, etc) simply using
* "days_ += days_" may not work. If instantiated with
* an int_adapter, shortcut operators are not present,
* so this will not compile */
//! Subtract another duration -- result is signed
BOOST_CXX14_CONSTEXPR date_duration& operator-=(const date_duration& rhs)
{
//days_ -= rhs.days_;
days_ = days_ - rhs.days_;
return *this;
}
//! Add a duration -- result is signed
BOOST_CXX14_CONSTEXPR date_duration& operator+=(const date_duration& rhs)
{
days_ = days_ + rhs.days_;
return *this;
}
//! unary- Allows for dd = -date_duration(2); -> dd == -2
BOOST_CXX14_CONSTEXPR date_duration operator-() const
{
return date_duration<duration_rep_traits>(get_rep() * (-1));
}
//! Division operations on a duration with an integer.
BOOST_CXX14_CONSTEXPR date_duration& operator/=(int divisor)
{
days_ = days_ / divisor;
return *this;
}
//! return sign information
BOOST_CXX14_CONSTEXPR bool is_negative() const
{
return days_ < 0;
}
private:
duration_rep days_;
};
/*! Struct for instantiating date_duration with <b>NO</b> special values
* functionality. Allows for transparent implementation of either
* date_duration<long> or date_duration<int_adapter<long> > */
struct BOOST_SYMBOL_VISIBLE duration_traits_long
{
typedef long int_type;
typedef long impl_type;
static BOOST_CXX14_CONSTEXPR int_type as_number(impl_type i) { return i; }
};
/*! Struct for instantiating date_duration <b>WITH</b> special values
* functionality. Allows for transparent implementation of either
* date_duration<long> or date_duration<int_adapter<long> > */
struct BOOST_SYMBOL_VISIBLE duration_traits_adapted
{
typedef long int_type;
typedef boost::date_time::int_adapter<long> impl_type;
static BOOST_CXX14_CONSTEXPR int_type as_number(impl_type i) { return i.as_number(); }
};
} } //namspace date_time
#endif

View File

@@ -0,0 +1,265 @@
#ifndef DATE_DURATION_TYPES_HPP___
#define DATE_DURATION_TYPES_HPP___
/* Copyright (c) 2004 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/int_adapter.hpp>
#include <boost/date_time/special_defs.hpp>
#include <boost/date_time/date_duration.hpp>
namespace boost {
namespace date_time {
//! Additional duration type that represents a number of n*7 days
template <class duration_config>
class BOOST_SYMBOL_VISIBLE weeks_duration : public date_duration<duration_config> {
public:
BOOST_CXX14_CONSTEXPR weeks_duration(typename duration_config::impl_type w)
: date_duration<duration_config>(w * 7) {}
BOOST_CXX14_CONSTEXPR weeks_duration(special_values sv)
: date_duration<duration_config>(sv) {}
};
// predeclare
template<class t>
class BOOST_SYMBOL_VISIBLE years_duration;
//! additional duration type that represents a logical month
/*! A logical month enables things like: "date(2002,Mar,2) + months(2) ->
* 2002-May2". If the date is a last day-of-the-month, the result will
* also be a last-day-of-the-month.
*/
template<class base_config>
class BOOST_SYMBOL_VISIBLE months_duration
{
private:
typedef typename base_config::int_rep int_rep;
typedef typename int_rep::int_type int_type;
typedef typename base_config::date_type date_type;
typedef typename date_type::duration_type duration_type;
typedef typename base_config::month_adjustor_type month_adjustor_type;
typedef months_duration<base_config> months_type;
typedef years_duration<base_config> years_type;
public:
BOOST_CXX14_CONSTEXPR months_duration(int_rep num) : _m(num) {}
BOOST_CXX14_CONSTEXPR months_duration(special_values sv) : _m(sv)
{
_m = int_rep::from_special(sv);
}
int_rep number_of_months() const { return _m; }
//! returns a negative duration
BOOST_CXX14_CONSTEXPR duration_type get_neg_offset(const date_type& d) const
{
month_adjustor_type m_adj(_m.as_number());
return duration_type(m_adj.get_neg_offset(d));
}
BOOST_CXX14_CONSTEXPR duration_type get_offset(const date_type& d) const
{
month_adjustor_type m_adj(_m.as_number());
return duration_type(m_adj.get_offset(d));
}
BOOST_CONSTEXPR bool operator==(const months_type& rhs) const
{
return(_m == rhs._m);
}
BOOST_CONSTEXPR bool operator!=(const months_type& rhs) const
{
return(_m != rhs._m);
}
BOOST_CXX14_CONSTEXPR months_type operator+(const months_type& rhs)const
{
return months_type(_m + rhs._m);
}
BOOST_CXX14_CONSTEXPR months_type& operator+=(const months_type& rhs)
{
_m = _m + rhs._m;
return *this;
}
BOOST_CXX14_CONSTEXPR months_type operator-(const months_type& rhs)const
{
return months_type(_m - rhs._m);
}
BOOST_CXX14_CONSTEXPR months_type& operator-=(const months_type& rhs)
{
_m = _m - rhs._m;
return *this;
}
BOOST_CXX14_CONSTEXPR months_type operator*(const int_type rhs)const
{
return months_type(_m * rhs);
}
BOOST_CXX14_CONSTEXPR months_type& operator*=(const int_type rhs)
{
_m = _m * rhs;
return *this;
}
BOOST_CXX14_CONSTEXPR months_type operator/(const int_type rhs)const
{
return months_type(_m / rhs);
}
BOOST_CXX14_CONSTEXPR months_type& operator/=(const int_type rhs)
{
_m = _m / rhs;
return *this;
}
BOOST_CXX14_CONSTEXPR months_type operator+(const years_type& y)const
{
return months_type(y.number_of_years() * 12 + _m);
}
BOOST_CXX14_CONSTEXPR months_type& operator+=(const years_type& y)
{
_m = y.number_of_years() * 12 + _m;
return *this;
}
BOOST_CXX14_CONSTEXPR months_type operator-(const years_type& y) const
{
return months_type(_m - y.number_of_years() * 12);
}
BOOST_CXX14_CONSTEXPR months_type& operator-=(const years_type& y)
{
_m = _m - y.number_of_years() * 12;
return *this;
}
//
BOOST_CXX14_CONSTEXPR friend date_type operator+(const date_type& d, const months_type& m)
{
return d + m.get_offset(d);
}
BOOST_CXX14_CONSTEXPR friend date_type operator+=(date_type& d, const months_type& m)
{
return d += m.get_offset(d);
}
BOOST_CXX14_CONSTEXPR friend date_type operator-(const date_type& d, const months_type& m)
{
// get_neg_offset returns a negative duration, so we add
return d + m.get_neg_offset(d);
}
BOOST_CXX14_CONSTEXPR friend date_type operator-=(date_type& d, const months_type& m)
{
// get_neg_offset returns a negative duration, so we add
return d += m.get_neg_offset(d);
}
private:
int_rep _m;
};
//! additional duration type that represents a logical year
/*! A logical year enables things like: "date(2002,Mar,2) + years(2) ->
* 2004-Mar-2". If the date is a last day-of-the-month, the result will
* also be a last-day-of-the-month (ie date(2001-Feb-28) + years(3) ->
* 2004-Feb-29).
*/
template<class base_config>
class BOOST_SYMBOL_VISIBLE years_duration
{
private:
typedef typename base_config::int_rep int_rep;
typedef typename int_rep::int_type int_type;
typedef typename base_config::date_type date_type;
typedef typename date_type::duration_type duration_type;
typedef typename base_config::month_adjustor_type month_adjustor_type;
typedef years_duration<base_config> years_type;
typedef months_duration<base_config> months_type;
public:
BOOST_CXX14_CONSTEXPR years_duration(int_rep num) : _y(num) {}
BOOST_CXX14_CONSTEXPR years_duration(special_values sv) : _y(sv)
{
_y = int_rep::from_special(sv);
}
BOOST_CXX14_CONSTEXPR int_rep number_of_years() const { return _y; }
//! returns a negative duration
BOOST_CXX14_CONSTEXPR duration_type get_neg_offset(const date_type& d) const
{
month_adjustor_type m_adj(_y.as_number() * 12);
return duration_type(m_adj.get_neg_offset(d));
}
BOOST_CXX14_CONSTEXPR duration_type get_offset(const date_type& d) const
{
month_adjustor_type m_adj(_y.as_number() * 12);
return duration_type(m_adj.get_offset(d));
}
BOOST_CXX14_CONSTEXPR bool operator==(const years_type& rhs) const
{
return(_y == rhs._y);
}
bool operator!=(const years_type& rhs) const
{
return(_y != rhs._y);
}
BOOST_CXX14_CONSTEXPR years_type operator+(const years_type& rhs)const
{
return years_type(_y + rhs._y);
}
BOOST_CXX14_CONSTEXPR years_type& operator+=(const years_type& rhs)
{
_y = _y + rhs._y;
return *this;
}
BOOST_CXX14_CONSTEXPR years_type operator-(const years_type& rhs)const
{
return years_type(_y - rhs._y);
}
BOOST_CXX14_CONSTEXPR years_type& operator-=(const years_type& rhs)
{
_y = _y - rhs._y;
return *this;
}
BOOST_CXX14_CONSTEXPR years_type operator*(const int_type rhs)const
{
return years_type(_y * rhs);
}
BOOST_CXX14_CONSTEXPR years_type& operator*=(const int_type rhs)
{
_y = _y * rhs;
return *this;
}
BOOST_CXX14_CONSTEXPR years_type operator/(const int_type rhs)const
{
return years_type(_y / rhs);
}
BOOST_CXX14_CONSTEXPR years_type& operator/=(const int_type rhs)
{
_y = _y / rhs;
return *this;
}
BOOST_CXX14_CONSTEXPR months_type operator+(const months_type& m) const
{
return(months_type(_y * 12 + m.number_of_months()));
}
BOOST_CXX14_CONSTEXPR months_type operator-(const months_type& m) const
{
return(months_type(_y * 12 - m.number_of_months()));
}
//
BOOST_CXX14_CONSTEXPR friend date_type operator+(const date_type& d, const years_type& y)
{
return d + y.get_offset(d);
}
BOOST_CXX14_CONSTEXPR friend date_type operator+=(date_type& d, const years_type& y)
{
return d += y.get_offset(d);
}
BOOST_CXX14_CONSTEXPR friend date_type operator-(const date_type& d, const years_type& y)
{
// get_neg_offset returns a negative duration, so we add
return d + y.get_neg_offset(d);
}
BOOST_CXX14_CONSTEXPR friend date_type operator-=(date_type& d, const years_type& y)
{
// get_neg_offset returns a negative duration, so we add
return d += y.get_neg_offset(d);
}
private:
int_rep _y;
};
}} // namespace boost::date_time
#endif // DATE_DURATION_TYPES_HPP___

View File

@@ -0,0 +1,766 @@
#ifndef _DATE_TIME_DATE_FACET__HPP___
#define _DATE_TIME_DATE_FACET__HPP___
/* Copyright (c) 2004-2005 CrystalClear Software, Inc.
* 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)
* Author: Martin Andrian, Jeff Garland, Bart Garst
* $Date$
*/
#include <iterator> // ostreambuf_iterator
#include <locale>
#include <string>
#include <vector>
#include <boost/throw_exception.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/period.hpp>
#include <boost/date_time/special_defs.hpp>
#include <boost/date_time/special_values_formatter.hpp>
#include <boost/date_time/period_formatter.hpp>
#include <boost/date_time/period_parser.hpp>
#include <boost/date_time/date_generator_formatter.hpp>
#include <boost/date_time/date_generator_parser.hpp>
#include <boost/date_time/format_date_parser.hpp>
namespace boost { namespace date_time {
/*! Class that provides format based I/O facet for date types.
*
* This class allows the formatting of dates by using format string.
* Format strings are:
*
* - %A => long_weekday_format - Full name Ex: Tuesday
* - %a => short_weekday_format - Three letter abbreviation Ex: Tue
* - %B => long_month_format - Full name Ex: October
* - %b => short_month_format - Three letter abbreviation Ex: Oct
* - %x => standard_format_specifier - defined by the locale
* - %Y-%b-%d => default_date_format - YYYY-Mon-dd
*
* Default month format == %b
* Default weekday format == %a
*/
template <class date_type,
class CharT,
class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> > >
class BOOST_SYMBOL_VISIBLE date_facet : public std::locale::facet {
public:
typedef typename date_type::duration_type duration_type;
// greg_weekday is gregorian_calendar::day_of_week_type
typedef typename date_type::day_of_week_type day_of_week_type;
typedef typename date_type::day_type day_type;
typedef typename date_type::month_type month_type;
typedef boost::date_time::period<date_type,duration_type> period_type;
typedef std::basic_string<CharT> string_type;
typedef CharT char_type;
typedef boost::date_time::period_formatter<CharT> period_formatter_type;
typedef boost::date_time::special_values_formatter<CharT> special_values_formatter_type;
typedef std::vector<std::basic_string<CharT> > input_collection_type;
// used for the output of the date_generators
typedef date_generator_formatter<date_type, CharT> date_gen_formatter_type;
typedef partial_date<date_type> partial_date_type;
typedef nth_kday_of_month<date_type> nth_kday_type;
typedef first_kday_of_month<date_type> first_kday_type;
typedef last_kday_of_month<date_type> last_kday_type;
typedef first_kday_after<date_type> kday_after_type;
typedef first_kday_before<date_type> kday_before_type;
static const char_type long_weekday_format[3];
static const char_type short_weekday_format[3];
static const char_type long_month_format[3];
static const char_type short_month_format[3];
static const char_type default_period_separator[4];
static const char_type standard_format_specifier[3];
static const char_type iso_format_specifier[7];
static const char_type iso_format_extended_specifier[9];
static const char_type default_date_format[9]; // YYYY-Mon-DD
static std::locale::id id;
#if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
std::locale::id& __get_id (void) const { return id; }
#endif
explicit date_facet(::size_t a_ref = 0)
: std::locale::facet(a_ref),
//m_format(standard_format_specifier)
m_format(default_date_format),
m_month_format(short_month_format),
m_weekday_format(short_weekday_format)
{}
explicit date_facet(const char_type* format_str,
const input_collection_type& short_names,
::size_t ref_count = 0)
: std::locale::facet(ref_count),
m_format(format_str),
m_month_format(short_month_format),
m_weekday_format(short_weekday_format),
m_month_short_names(short_names)
{}
explicit date_facet(const char_type* format_str,
period_formatter_type per_formatter = period_formatter_type(),
special_values_formatter_type sv_formatter = special_values_formatter_type(),
date_gen_formatter_type dg_formatter = date_gen_formatter_type(),
::size_t ref_count = 0)
: std::locale::facet(ref_count),
m_format(format_str),
m_month_format(short_month_format),
m_weekday_format(short_weekday_format),
m_period_formatter(per_formatter),
m_date_gen_formatter(dg_formatter),
m_special_values_formatter(sv_formatter)
{}
void format(const char_type* const format_str) {
m_format = format_str;
}
virtual void set_iso_format()
{
m_format = iso_format_specifier;
}
virtual void set_iso_extended_format()
{
m_format = iso_format_extended_specifier;
}
void month_format(const char_type* const format_str) {
m_month_format = format_str;
}
void weekday_format(const char_type* const format_str) {
m_weekday_format = format_str;
}
void period_formatter(period_formatter_type per_formatter) {
m_period_formatter= per_formatter;
}
void special_values_formatter(const special_values_formatter_type& svf)
{
m_special_values_formatter = svf;
}
void short_weekday_names(const input_collection_type& short_names)
{
m_weekday_short_names = short_names;
}
void long_weekday_names(const input_collection_type& long_names)
{
m_weekday_long_names = long_names;
}
void short_month_names(const input_collection_type& short_names)
{
m_month_short_names = short_names;
}
void long_month_names(const input_collection_type& long_names)
{
m_month_long_names = long_names;
}
void date_gen_phrase_strings(const input_collection_type& new_strings,
typename date_gen_formatter_type::phrase_elements beg_pos=date_gen_formatter_type::first)
{
m_date_gen_formatter.elements(new_strings, beg_pos);
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const date_type& d) const
{
if (d.is_special()) {
return do_put_special(next, a_ios, fill_char, d.as_special());
}
//The following line of code required the date to support a to_tm function
return do_put_tm(next, a_ios, fill_char, to_tm(d), m_format);
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const duration_type& dd) const
{
if (dd.is_special()) {
return do_put_special(next, a_ios, fill_char, dd.get_rep().as_special());
}
typedef std::num_put<CharT, OutItrT> num_put;
if (std::has_facet<num_put>(a_ios.getloc())) {
return std::use_facet<num_put>(a_ios.getloc()).put(next, a_ios, fill_char, dd.get_rep().as_number());
}
else {
num_put* f = new num_put();
std::locale l = std::locale(a_ios.getloc(), f);
a_ios.imbue(l);
return f->put(next, a_ios, fill_char, dd.get_rep().as_number());
}
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const month_type& m) const
{
//if (d.is_special()) {
// return do_put_special(next, a_ios, fill_char, d.as_special());
//}
//The following line of code required the date to support a to_tm function
std::tm dtm;
std::memset(&dtm, 0, sizeof(dtm));
dtm.tm_mon = m - 1;
return do_put_tm(next, a_ios, fill_char, dtm, m_month_format);
}
//! puts the day of month
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const day_type& day) const
{
std::tm dtm;
std::memset(&dtm, 0, sizeof(dtm));
dtm.tm_mday = day.as_number();
char_type tmp[3] = {'%','d'};
string_type temp_format(tmp);
return do_put_tm(next, a_ios, fill_char, dtm, temp_format);
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const day_of_week_type& dow) const
{
//if (d.is_special()) {
// return do_put_special(next, a_ios, fill_char, d.as_special());
//}
//The following line of code required the date to support a to_tm function
std::tm dtm;
std::memset(&dtm, 0, sizeof(dtm));
dtm.tm_wday = dow;
return do_put_tm(next, a_ios, fill_char, dtm, m_weekday_format);
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const period_type& p) const
{
return m_period_formatter.put_period(next, a_ios, fill_char, p, *this);
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const partial_date_type& pd) const
{
return m_date_gen_formatter.put_partial_date(next, a_ios, fill_char, pd, *this);
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const nth_kday_type& nkd) const
{
return m_date_gen_formatter.put_nth_kday(next, a_ios, fill_char, nkd, *this);
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const first_kday_type& fkd) const
{
return m_date_gen_formatter.put_first_kday(next, a_ios, fill_char, fkd, *this);
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const last_kday_type& lkd) const
{
return m_date_gen_formatter.put_last_kday(next, a_ios, fill_char, lkd, *this);
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const kday_before_type& fkb) const
{
return m_date_gen_formatter.put_kday_before(next, a_ios, fill_char, fkb, *this);
}
OutItrT put(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const kday_after_type& fka) const
{
return m_date_gen_formatter.put_kday_after(next, a_ios, fill_char, fka, *this);
}
protected:
virtual OutItrT do_put_special(OutItrT next,
std::ios_base& /*a_ios*/,
char_type /*fill_char*/,
const boost::date_time::special_values sv) const
{
m_special_values_formatter.put_special(next, sv);
return next;
}
virtual OutItrT do_put_tm(OutItrT next,
std::ios_base& a_ios,
char_type fill_char,
const tm& tm_value,
string_type a_format) const
{
// update format string with custom names
if (!m_weekday_long_names.empty()) {
boost::algorithm::replace_all(a_format,
long_weekday_format,
m_weekday_long_names[tm_value.tm_wday]);
}
if (!m_weekday_short_names.empty()) {
boost::algorithm::replace_all(a_format,
short_weekday_format,
m_weekday_short_names[tm_value.tm_wday]);
}
if (!m_month_long_names.empty()) {
boost::algorithm::replace_all(a_format,
long_month_format,
m_month_long_names[tm_value.tm_mon]);
}
if (!m_month_short_names.empty()) {
boost::algorithm::replace_all(a_format,
short_month_format,
m_month_short_names[tm_value.tm_mon]);
}
// use time_put facet to create final string
const char_type* p_format = a_format.c_str();
return std::use_facet<std::time_put<CharT> >(a_ios.getloc()).put(next, a_ios,
fill_char,
&tm_value,
p_format,
p_format + a_format.size());
}
protected:
string_type m_format;
string_type m_month_format;
string_type m_weekday_format;
period_formatter_type m_period_formatter;
date_gen_formatter_type m_date_gen_formatter;
special_values_formatter_type m_special_values_formatter;
input_collection_type m_month_short_names;
input_collection_type m_month_long_names;
input_collection_type m_weekday_short_names;
input_collection_type m_weekday_long_names;
private:
};
template <class date_type, class CharT, class OutItrT>
std::locale::id date_facet<date_type, CharT, OutItrT>::id;
template <class date_type, class CharT, class OutItrT>
const typename date_facet<date_type, CharT, OutItrT>::char_type
date_facet<date_type, CharT, OutItrT>::long_weekday_format[3] = {'%','A'};
template <class date_type, class CharT, class OutItrT>
const typename date_facet<date_type, CharT, OutItrT>::char_type
date_facet<date_type, CharT, OutItrT>::short_weekday_format[3] = {'%','a'};
template <class date_type, class CharT, class OutItrT>
const typename date_facet<date_type, CharT, OutItrT>::char_type
date_facet<date_type, CharT, OutItrT>::long_month_format[3] = {'%','B'};
template <class date_type, class CharT, class OutItrT>
const typename date_facet<date_type, CharT, OutItrT>::char_type
date_facet<date_type, CharT, OutItrT>::short_month_format[3] = {'%','b'};
template <class date_type, class CharT, class OutItrT>
const typename date_facet<date_type, CharT, OutItrT>::char_type
date_facet<date_type, CharT, OutItrT>::default_period_separator[4] = { ' ', '/', ' '};
template <class date_type, class CharT, class OutItrT>
const typename date_facet<date_type, CharT, OutItrT>::char_type
date_facet<date_type, CharT, OutItrT>::standard_format_specifier[3] =
{'%', 'x' };
template <class date_type, class CharT, class OutItrT>
const typename date_facet<date_type, CharT, OutItrT>::char_type
date_facet<date_type, CharT, OutItrT>::iso_format_specifier[7] =
{'%', 'Y', '%', 'm', '%', 'd' };
template <class date_type, class CharT, class OutItrT>
const typename date_facet<date_type, CharT, OutItrT>::char_type
date_facet<date_type, CharT, OutItrT>::iso_format_extended_specifier[9] =
{'%', 'Y', '-', '%', 'm', '-', '%', 'd' };
template <class date_type, class CharT, class OutItrT>
const typename date_facet<date_type, CharT, OutItrT>::char_type
date_facet<date_type, CharT, OutItrT>::default_date_format[9] =
{'%','Y','-','%','b','-','%','d'};
//! Input facet
template <class date_type,
class CharT,
class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> > >
class BOOST_SYMBOL_VISIBLE date_input_facet : public std::locale::facet {
public:
typedef typename date_type::duration_type duration_type;
// greg_weekday is gregorian_calendar::day_of_week_type
typedef typename date_type::day_of_week_type day_of_week_type;
typedef typename date_type::day_type day_type;
typedef typename date_type::month_type month_type;
typedef typename date_type::year_type year_type;
typedef boost::date_time::period<date_type,duration_type> period_type;
typedef std::basic_string<CharT> string_type;
typedef CharT char_type;
typedef boost::date_time::period_parser<date_type, CharT> period_parser_type;
typedef boost::date_time::special_values_parser<date_type,CharT> special_values_parser_type;
typedef std::vector<std::basic_string<CharT> > input_collection_type;
typedef format_date_parser<date_type, CharT> format_date_parser_type;
// date_generators stuff goes here
typedef date_generator_parser<date_type, CharT> date_gen_parser_type;
typedef partial_date<date_type> partial_date_type;
typedef nth_kday_of_month<date_type> nth_kday_type;
typedef first_kday_of_month<date_type> first_kday_type;
typedef last_kday_of_month<date_type> last_kday_type;
typedef first_kday_after<date_type> kday_after_type;
typedef first_kday_before<date_type> kday_before_type;
static const char_type long_weekday_format[3];
static const char_type short_weekday_format[3];
static const char_type long_month_format[3];
static const char_type short_month_format[3];
static const char_type four_digit_year_format[3];
static const char_type two_digit_year_format[3];
static const char_type default_period_separator[4];
static const char_type standard_format_specifier[3];
static const char_type iso_format_specifier[7];
static const char_type iso_format_extended_specifier[9];
static const char_type default_date_format[9]; // YYYY-Mon-DD
static std::locale::id id;
explicit date_input_facet(::size_t a_ref = 0)
: std::locale::facet(a_ref),
m_format(default_date_format),
m_month_format(short_month_format),
m_weekday_format(short_weekday_format),
m_year_format(four_digit_year_format),
m_parser(m_format, std::locale::classic())
// default period_parser & special_values_parser used
{}
explicit date_input_facet(const string_type& format_str,
::size_t a_ref = 0)
: std::locale::facet(a_ref),
m_format(format_str),
m_month_format(short_month_format),
m_weekday_format(short_weekday_format),
m_year_format(four_digit_year_format),
m_parser(m_format, std::locale::classic())
// default period_parser & special_values_parser used
{}
explicit date_input_facet(const string_type& format_str,
const format_date_parser_type& date_parser,
const special_values_parser_type& sv_parser,
const period_parser_type& per_parser,
const date_gen_parser_type& date_gen_parser,
::size_t ref_count = 0)
: std::locale::facet(ref_count),
m_format(format_str),
m_month_format(short_month_format),
m_weekday_format(short_weekday_format),
m_year_format(four_digit_year_format),
m_parser(date_parser),
m_date_gen_parser(date_gen_parser),
m_period_parser(per_parser),
m_sv_parser(sv_parser)
{}
void format(const char_type* const format_str) {
m_format = format_str;
}
virtual void set_iso_format()
{
m_format = iso_format_specifier;
}
virtual void set_iso_extended_format()
{
m_format = iso_format_extended_specifier;
}
void month_format(const char_type* const format_str) {
m_month_format = format_str;
}
void weekday_format(const char_type* const format_str) {
m_weekday_format = format_str;
}
void year_format(const char_type* const format_str) {
m_year_format = format_str;
}
void period_parser(period_parser_type per_parser) {
m_period_parser = per_parser;
}
void short_weekday_names(const input_collection_type& weekday_names)
{
m_parser.short_weekday_names(weekday_names);
}
void long_weekday_names(const input_collection_type& weekday_names)
{
m_parser.long_weekday_names(weekday_names);
}
void short_month_names(const input_collection_type& month_names)
{
m_parser.short_month_names(month_names);
}
void long_month_names(const input_collection_type& month_names)
{
m_parser.long_month_names(month_names);
}
void date_gen_element_strings(const input_collection_type& col)
{
m_date_gen_parser.element_strings(col);
}
void date_gen_element_strings(const string_type& first,
const string_type& second,
const string_type& third,
const string_type& fourth,
const string_type& fifth,
const string_type& last,
const string_type& before,
const string_type& after,
const string_type& of)
{
m_date_gen_parser.element_strings(first,second,third,fourth,fifth,last,before,after,of);
}
void special_values_parser(special_values_parser_type sv_parser)
{
m_sv_parser = sv_parser;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& /*a_ios*/,
date_type& d) const
{
d = m_parser.parse_date(from, to, m_format, m_sv_parser);
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& /*a_ios*/,
month_type& m) const
{
m = m_parser.parse_month(from, to, m_month_format);
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& /*a_ios*/,
day_of_week_type& wd) const
{
wd = m_parser.parse_weekday(from, to, m_weekday_format);
return from;
}
//! Expects 1 or 2 digit day range: 1-31
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& /*a_ios*/,
day_type& d) const
{
d = m_parser.parse_var_day_of_month(from, to);
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& /*a_ios*/,
year_type& y) const
{
y = m_parser.parse_year(from, to, m_year_format);
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& a_ios,
duration_type& dd) const
{
// skip leading whitespace
while(std::isspace(*from) && from != to) { ++from; }
/* num_get.get() will always consume the first character if it
* is a sign indicator (+/-). Special value strings may begin
* with one of these signs so we'll need a copy of it
* in case num_get.get() fails. */
char_type c = '\0';
// TODO Are these characters somewhere in the locale?
if(*from == '-' || *from == '+') {
c = *from;
}
typedef std::num_get<CharT, InItrT> num_get;
typename duration_type::duration_rep_type val = 0;
std::ios_base::iostate err = std::ios_base::goodbit;
if (std::has_facet<num_get>(a_ios.getloc())) {
from = std::use_facet<num_get>(a_ios.getloc()).get(from, to, a_ios, err, val);
}
else {
num_get* ng = new num_get();
std::locale l = std::locale(a_ios.getloc(), ng);
a_ios.imbue(l);
from = ng->get(from, to, a_ios, err, val);
}
if(err & std::ios_base::failbit){
typedef typename special_values_parser_type::match_results match_results;
match_results mr;
if(c == '-' || c == '+') { // was the first character consumed?
mr.cache += c;
}
m_sv_parser.match(from, to, mr);
if(mr.current_match == match_results::PARSE_ERROR) {
boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'"));
BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return from); // should never reach
}
dd = duration_type(static_cast<special_values>(mr.current_match));
}
else {
dd = duration_type(val);
}
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& a_ios,
period_type& p) const
{
p = m_period_parser.get_period(from, to, a_ios, p, duration_type::unit(), *this);
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& a_ios,
nth_kday_type& nkd) const
{
nkd = m_date_gen_parser.get_nth_kday_type(from, to, a_ios, *this);
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& a_ios,
partial_date_type& pd) const
{
pd = m_date_gen_parser.get_partial_date_type(from, to, a_ios, *this);
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& a_ios,
first_kday_type& fkd) const
{
fkd = m_date_gen_parser.get_first_kday_type(from, to, a_ios, *this);
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& a_ios,
last_kday_type& lkd) const
{
lkd = m_date_gen_parser.get_last_kday_type(from, to, a_ios, *this);
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& a_ios,
kday_before_type& fkb) const
{
fkb = m_date_gen_parser.get_kday_before_type(from, to, a_ios, *this);
return from;
}
InItrT get(InItrT& from,
InItrT& to,
std::ios_base& a_ios,
kday_after_type& fka) const
{
fka = m_date_gen_parser.get_kday_after_type(from, to, a_ios, *this);
return from;
}
protected:
string_type m_format;
string_type m_month_format;
string_type m_weekday_format;
string_type m_year_format;
format_date_parser_type m_parser;
date_gen_parser_type m_date_gen_parser;
period_parser_type m_period_parser;
special_values_parser_type m_sv_parser;
private:
};
template <class date_type, class CharT, class OutItrT>
std::locale::id date_input_facet<date_type, CharT, OutItrT>::id;
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::long_weekday_format[3] = {'%','A'};
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::short_weekday_format[3] = {'%','a'};
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::long_month_format[3] = {'%','B'};
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::short_month_format[3] = {'%','b'};
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::four_digit_year_format[3] = {'%','Y'};
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::two_digit_year_format[3] = {'%','y'};
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::default_period_separator[4] = { ' ', '/', ' '};
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::standard_format_specifier[3] =
{'%', 'x' };
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::iso_format_specifier[7] =
{'%', 'Y', '%', 'm', '%', 'd' };
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::iso_format_extended_specifier[9] =
{'%', 'Y', '-', '%', 'm', '-', '%', 'd' };
template <class date_type, class CharT, class OutItrT>
const typename date_input_facet<date_type, CharT, OutItrT>::char_type
date_input_facet<date_type, CharT, OutItrT>::default_date_format[9] =
{'%','Y','-','%','b','-','%','d'};
} } // namespaces
#endif

View File

@@ -0,0 +1,159 @@
#ifndef DATE_TIME_SIMPLE_FORMAT_HPP___
#define DATE_TIME_SIMPLE_FORMAT_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/parse_format_base.hpp"
namespace boost {
namespace date_time {
//! Class to provide simple basic formatting rules
template<class charT>
class simple_format {
public:
//! String used printed is date is invalid
static const charT* not_a_date()
{
return "not-a-date-time";
}
//! String used to for positive infinity value
static const charT* pos_infinity()
{
return "+infinity";
}
//! String used to for positive infinity value
static const charT* neg_infinity()
{
return "-infinity";
}
//! Describe month format
static month_format_spec month_format()
{
return month_as_short_string;
}
static ymd_order_spec date_order()
{
return ymd_order_iso; //YYYY-MM-DD
}
//! This format uses '-' to separate date elements
static bool has_date_sep_chars()
{
return true;
}
//! Char to sep?
static charT year_sep_char()
{
return '-';
}
//! char between year-month
static charT month_sep_char()
{
return '-';
}
//! Char to separate month-day
static charT day_sep_char()
{
return '-';
}
//! char between date-hours
static charT hour_sep_char()
{
return ' ';
}
//! char between hour and minute
static charT minute_sep_char()
{
return ':';
}
//! char for second
static charT second_sep_char()
{
return ':';
}
};
#ifndef BOOST_NO_STD_WSTRING
//! Specialization of formmating rules for wchar_t
template<>
class simple_format<wchar_t> {
public:
//! String used printed is date is invalid
static const wchar_t* not_a_date()
{
return L"not-a-date-time";
}
//! String used to for positive infinity value
static const wchar_t* pos_infinity()
{
return L"+infinity";
}
//! String used to for positive infinity value
static const wchar_t* neg_infinity()
{
return L"-infinity";
}
//! Describe month format
static month_format_spec month_format()
{
return month_as_short_string;
}
static ymd_order_spec date_order()
{
return ymd_order_iso; //YYYY-MM-DD
}
//! This format uses '-' to separate date elements
static bool has_date_sep_chars()
{
return true;
}
//! Char to sep?
static wchar_t year_sep_char()
{
return '-';
}
//! char between year-month
static wchar_t month_sep_char()
{
return '-';
}
//! Char to separate month-day
static wchar_t day_sep_char()
{
return '-';
}
//! char between date-hours
static wchar_t hour_sep_char()
{
return ' ';
}
//! char between hour and minute
static wchar_t minute_sep_char()
{
return ':';
}
//! char for second
static wchar_t second_sep_char()
{
return ':';
}
};
#endif // BOOST_NO_STD_WSTRING
} } //namespace date_time
#endif

View File

@@ -0,0 +1,137 @@
#ifndef DATE_TIME_DATE_FORMATTING_HPP___
#define DATE_TIME_DATE_FORMATTING_HPP___
/* Copyright (c) 2002-2004 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/iso_format.hpp"
#include "boost/date_time/compiler_config.hpp"
#include <boost/io/ios_state.hpp>
#include <string>
#include <sstream>
#include <iomanip>
/* NOTE: "formatter" code for older compilers, ones that define
* BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS, is located in
* date_formatting_limited.hpp
*/
namespace boost {
namespace date_time {
//! Formats a month as as string into an ostream
template<class month_type, class format_type, class charT=char>
class month_formatter
{
typedef std::basic_ostream<charT> ostream_type;
public:
//! Formats a month as as string into an ostream
/*! This function demands that month_type provide
* functions for converting to short and long strings
* if that capability is used.
*/
static ostream_type& format_month(const month_type& month,
ostream_type &os)
{
switch (format_type::month_format())
{
case month_as_short_string:
{
os << month.as_short_string();
break;
}
case month_as_long_string:
{
os << month.as_long_string();
break;
}
case month_as_integer:
{
boost::io::basic_ios_fill_saver<charT> ifs(os);
os << std::setw(2) << std::setfill(os.widen('0')) << month.as_number();
break;
}
default:
break;
}
return os;
} // format_month
};
//! Convert ymd to a standard string formatting policies
template<class ymd_type, class format_type, class charT=char>
class ymd_formatter
{
public:
//! Convert ymd to a standard string formatting policies
/*! This is standard code for handling date formatting with
* year-month-day based date information. This function
* uses the format_type to control whether the string will
* contain separator characters, and if so what the character
* will be. In addtion, it can format the month as either
* an integer or a string as controled by the formatting
* policy
*/
static std::basic_string<charT> ymd_to_string(ymd_type ymd)
{
typedef typename ymd_type::month_type month_type;
std::basic_ostringstream<charT> ss;
// Temporarily switch to classic locale to prevent possible formatting
// of year with comma or other character (for example 2,008).
ss.imbue(std::locale::classic());
ss << ymd.year;
ss.imbue(std::locale());
if (format_type::has_date_sep_chars()) {
ss << format_type::month_sep_char();
}
//this name is a bit ugly, oh well....
month_formatter<month_type,format_type,charT>::format_month(ymd.month, ss);
if (format_type::has_date_sep_chars()) {
ss << format_type::day_sep_char();
}
ss << std::setw(2) << std::setfill(ss.widen('0'))
<< ymd.day;
return ss.str();
}
};
//! Convert a date to string using format policies
template<class date_type, class format_type, class charT=char>
class date_formatter
{
public:
typedef std::basic_string<charT> string_type;
//! Convert to a date to standard string using format policies
static string_type date_to_string(date_type d)
{
typedef typename date_type::ymd_type ymd_type;
if (d.is_not_a_date()) {
return string_type(format_type::not_a_date());
}
if (d.is_neg_infinity()) {
return string_type(format_type::neg_infinity());
}
if (d.is_pos_infinity()) {
return string_type(format_type::pos_infinity());
}
ymd_type ymd = d.year_month_day();
return ymd_formatter<ymd_type, format_type, charT>::ymd_to_string(ymd);
}
};
} } //namespace date_time
#endif

View File

@@ -0,0 +1,121 @@
#ifndef DATE_TIME_DATE_FORMATTING_LIMITED_HPP___
#define DATE_TIME_DATE_FORMATTING_LIMITED_HPP___
/* Copyright (c) 2002-2004 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/iso_format.hpp"
#include "boost/date_time/compiler_config.hpp"
#include <string>
#include <sstream>
#include <iomanip>
namespace boost {
namespace date_time {
//! Formats a month as as string into an ostream
template<class month_type, class format_type>
class month_formatter
{
public:
//! Formats a month as as string into an ostream
/*! This function demands that month_type provide
* functions for converting to short and long strings
* if that capability is used.
*/
static std::ostream& format_month(const month_type& month,
std::ostream& os)
{
switch (format_type::month_format())
{
case month_as_short_string:
{
os << month.as_short_string();
break;
}
case month_as_long_string:
{
os << month.as_long_string();
break;
}
case month_as_integer:
{
os << std::setw(2) << std::setfill('0') << month.as_number();
break;
}
}
return os;
} // format_month
};
//! Convert ymd to a standard string formatting policies
template<class ymd_type, class format_type>
class ymd_formatter
{
public:
//! Convert ymd to a standard string formatting policies
/*! This is standard code for handling date formatting with
* year-month-day based date information. This function
* uses the format_type to control whether the string will
* contain separator characters, and if so what the character
* will be. In addtion, it can format the month as either
* an integer or a string as controled by the formatting
* policy
*/
static std::string ymd_to_string(ymd_type ymd)
{
typedef typename ymd_type::month_type month_type;
std::ostringstream ss;
ss << ymd.year;
if (format_type::has_date_sep_chars()) {
ss << format_type::month_sep_char();
}
//this name is a bit ugly, oh well....
month_formatter<month_type,format_type>::format_month(ymd.month, ss);
if (format_type::has_date_sep_chars()) {
ss << format_type::day_sep_char();
}
ss << std::setw(2) << std::setfill('0')
<< ymd.day;
return ss.str();
}
};
//! Convert a date to string using format policies
template<class date_type, class format_type>
class date_formatter
{
public:
//! Convert to a date to standard string using format policies
static std::string date_to_string(date_type d)
{
typedef typename date_type::ymd_type ymd_type;
if (d.is_not_a_date()) {
return format_type::not_a_date();
}
if (d.is_neg_infinity()) {
return format_type::neg_infinity();
}
if (d.is_pos_infinity()) {
return format_type::pos_infinity();
}
ymd_type ymd = d.year_month_day();
return ymd_formatter<ymd_type, format_type>::ymd_to_string(ymd);
}
};
} } //namespace date_time
#endif

View File

@@ -0,0 +1,234 @@
#ifndef DATE_TIME_DATE_FORMATTING_LOCALES_HPP___
#define DATE_TIME_DATE_FORMATTING_LOCALES_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/locale_config.hpp" // set BOOST_DATE_TIME_NO_LOCALE
#ifndef BOOST_DATE_TIME_NO_LOCALE
#include "boost/date_time/iso_format.hpp"
#include "boost/date_time/date_names_put.hpp"
#include "boost/date_time/parse_format_base.hpp"
#include <boost/io/ios_state.hpp>
//#include <string>
#include <sstream>
#include <iomanip>
namespace boost {
namespace date_time {
//! Formats a month as as string into an ostream
template<class facet_type,
class charT = char>
class ostream_month_formatter
{
public:
typedef typename facet_type::month_type month_type;
typedef std::basic_ostream<charT> ostream_type;
//! Formats a month as as string into an output iterator
static void format_month(const month_type& month,
ostream_type& os,
const facet_type& f)
{
switch (f.month_format())
{
case month_as_short_string:
{
std::ostreambuf_iterator<charT> oitr(os);
f.put_month_short(oitr, month.as_enum());
break;
}
case month_as_long_string:
{
std::ostreambuf_iterator<charT> oitr(os);
f.put_month_long(oitr, month.as_enum());
break;
}
case month_as_integer:
{
boost::io::basic_ios_fill_saver<charT> ifs(os);
os << std::setw(2) << std::setfill(os.widen('0')) << month.as_number();
break;
}
}
} // format_month
};
//! Formats a weekday
template<class weekday_type,
class facet_type,
class charT = char>
class ostream_weekday_formatter
{
public:
typedef typename facet_type::month_type month_type;
typedef std::basic_ostream<charT> ostream_type;
//! Formats a month as as string into an output iterator
static void format_weekday(const weekday_type& wd,
ostream_type& os,
const facet_type& f,
bool as_long_string)
{
std::ostreambuf_iterator<charT> oitr(os);
if (as_long_string) {
f.put_weekday_long(oitr, wd.as_enum());
}
else {
f.put_weekday_short(oitr, wd.as_enum());
}
} // format_weekday
};
//! Convert ymd to a standard string formatting policies
template<class ymd_type,
class facet_type,
class charT = char>
class ostream_ymd_formatter
{
public:
typedef typename ymd_type::month_type month_type;
typedef ostream_month_formatter<facet_type, charT> month_formatter_type;
typedef std::basic_ostream<charT> ostream_type;
typedef std::basic_string<charT> foo_type;
//! Convert ymd to a standard string formatting policies
/*! This is standard code for handling date formatting with
* year-month-day based date information. This function
* uses the format_type to control whether the string will
* contain separator characters, and if so what the character
* will be. In addtion, it can format the month as either
* an integer or a string as controled by the formatting
* policy
*/
// static string_type ymd_to_string(ymd_type ymd)
// {
// std::ostringstream ss;
// facet_type dnp;
// ymd_put(ymd, ss, dnp);
// return ss.str();
// }
// Put ymd to ostream -- part of ostream refactor
static void ymd_put(ymd_type ymd,
ostream_type& os,
const facet_type& f)
{
boost::io::basic_ios_fill_saver<charT> ifs(os);
std::ostreambuf_iterator<charT> oitr(os);
switch (f.date_order()) {
case ymd_order_iso: {
os << ymd.year;
if (f.has_date_sep_chars()) {
f.month_sep_char(oitr);
}
month_formatter_type::format_month(ymd.month, os, f);
if (f.has_date_sep_chars()) {
f.day_sep_char(oitr);
}
os << std::setw(2) << std::setfill(os.widen('0'))
<< ymd.day;
break;
}
case ymd_order_us: {
month_formatter_type::format_month(ymd.month, os, f);
if (f.has_date_sep_chars()) {
f.day_sep_char(oitr);
}
os << std::setw(2) << std::setfill(os.widen('0'))
<< ymd.day;
if (f.has_date_sep_chars()) {
f.month_sep_char(oitr);
}
os << ymd.year;
break;
}
case ymd_order_dmy: {
os << std::setw(2) << std::setfill(os.widen('0'))
<< ymd.day;
if (f.has_date_sep_chars()) {
f.day_sep_char(oitr);
}
month_formatter_type::format_month(ymd.month, os, f);
if (f.has_date_sep_chars()) {
f.month_sep_char(oitr);
}
os << ymd.year;
break;
}
}
}
};
//! Convert a date to string using format policies
template<class date_type,
class facet_type,
class charT = char>
class ostream_date_formatter
{
public:
typedef std::basic_ostream<charT> ostream_type;
typedef typename date_type::ymd_type ymd_type;
//! Put date into an ostream
static void date_put(const date_type& d,
ostream_type& os,
const facet_type& f)
{
special_values sv = d.as_special();
if (sv == not_special) {
ymd_type ymd = d.year_month_day();
ostream_ymd_formatter<ymd_type, facet_type, charT>::ymd_put(ymd, os, f);
}
else { // output a special value
std::ostreambuf_iterator<charT> coi(os);
f.put_special_value(coi, sv);
}
}
//! Put date into an ostream
static void date_put(const date_type& d,
ostream_type& os)
{
//retrieve the local from the ostream
std::locale locale = os.getloc();
if (std::has_facet<facet_type>(locale)) {
const facet_type& f = std::use_facet<facet_type>(locale);
date_put(d, os, f);
}
else {
//default to something sensible if no facet installed
facet_type default_facet;
date_put(d, os, default_facet);
}
} // date_to_ostream
}; //class date_formatter
} } //namespace date_time
#endif
#endif

View File

@@ -0,0 +1,265 @@
#ifndef _DATE_TIME_DATE_GENERATOR_FORMATTER__HPP___
#define _DATE_TIME_DATE_GENERATOR_FORMATTER__HPP___
/* Copyright (c) 2004 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include "boost/date_time/date_generators.hpp"
namespace boost {
namespace date_time {
//! Formats date_generators for output
/*! Formatting of date_generators follows specific orders for the
* various types of date_generators.
* - partial_date => "dd Month"
* - nth_day_of_the_week_in_month => "nth weekday of month"
* - first_day_of_the_week_in_month => "first weekday of month"
* - last_day_of_the_week_in_month => "last weekday of month"
* - first_day_of_the_week_after => "weekday after"
* - first_day_of_the_week_before => "weekday before"
* While the order of the elements in these phrases cannot be changed,
* the elements themselves can be. Weekday and Month get their formats
* and names from the date_facet. The remaining elements are stored in
* the date_generator_formatter and can be customized upon construction
* or via a member function. The default elements are those shown in the
* examples above.
*/
template <class date_type, class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> > >
class date_generator_formatter {
public:
typedef partial_date<date_type> partial_date_type;
typedef nth_kday_of_month<date_type> nth_kday_type;
typedef first_kday_of_month<date_type> first_kday_type;
typedef last_kday_of_month<date_type> last_kday_type;
typedef first_kday_after<date_type> kday_after_type;
typedef first_kday_before<date_type> kday_before_type;
typedef CharT char_type;
typedef std::basic_string<char_type> string_type;
typedef std::vector<string_type> collection_type;
static const char_type first_string[6];
static const char_type second_string[7];
static const char_type third_string[6];
static const char_type fourth_string[7];
static const char_type fifth_string[6];
static const char_type last_string[5];
static const char_type before_string[8];
static const char_type after_string[6];
static const char_type of_string[3];
enum phrase_elements {first=0, second, third, fourth, fifth, last,
before, after, of, number_of_phrase_elements};
//! Default format elements used
date_generator_formatter()
{
phrase_strings.reserve(number_of_phrase_elements);
phrase_strings.push_back(string_type(first_string));
phrase_strings.push_back(string_type(second_string));
phrase_strings.push_back(string_type(third_string));
phrase_strings.push_back(string_type(fourth_string));
phrase_strings.push_back(string_type(fifth_string));
phrase_strings.push_back(string_type(last_string));
phrase_strings.push_back(string_type(before_string));
phrase_strings.push_back(string_type(after_string));
phrase_strings.push_back(string_type(of_string));
}
//! Constructor that allows for a custom set of phrase elements
date_generator_formatter(const string_type& first_str,
const string_type& second_str,
const string_type& third_str,
const string_type& fourth_str,
const string_type& fifth_str,
const string_type& last_str,
const string_type& before_str,
const string_type& after_str,
const string_type& of_str)
{
phrase_strings.reserve(number_of_phrase_elements);
phrase_strings.push_back(first_str);
phrase_strings.push_back(second_str);
phrase_strings.push_back(third_str);
phrase_strings.push_back(fourth_str);
phrase_strings.push_back(fifth_str);
phrase_strings.push_back(last_str);
phrase_strings.push_back(before_str);
phrase_strings.push_back(after_str);
phrase_strings.push_back(of_str);
}
//! Replace the set of phrase elements with those contained in new_strings
/*! The order of the strings in the given collection is important.
* They must follow:
* - first, second, third, fourth, fifth, last, before, after, of.
*
* It is not necessary to send in a complete set if only a few
* elements are to be replaced as long as the correct beg_pos is used.
*
* Ex: To keep the default first through fifth elements, but replace
* the rest with a collection of:
* - "final", "prior", "following", "in".
* The beg_pos of date_generator_formatter::last would be used.
*/
void elements(const collection_type& new_strings,
phrase_elements beg_pos=first)
{
if(beg_pos < number_of_phrase_elements) {
typename collection_type::iterator itr = phrase_strings.begin();
itr += beg_pos;
std::copy(new_strings.begin(), new_strings.end(),
itr);
//phrase_strings.begin());
}
}
//!Put a partial_date => "dd Month"
template<class facet_type>
OutItrT put_partial_date(OutItrT next, std::ios_base& a_ios,
CharT a_fill, const partial_date_type& pd,
const facet_type& facet) const
{
facet.put(next, a_ios, a_fill, pd.day());
next = a_fill; //TODO change this ???
facet.put(next, a_ios, a_fill, pd.month());
return next;
}
//! Put an nth_day_of_the_week_in_month => "nth weekday of month"
template<class facet_type>
OutItrT put_nth_kday(OutItrT next, std::ios_base& a_ios,
CharT a_fill, const nth_kday_type& nkd,
const facet_type& facet) const
{
put_string(next, phrase_strings[nkd.nth_week() -1]);
next = a_fill; //TODO change this ???
facet.put(next, a_ios, a_fill, nkd.day_of_week());
next = a_fill; //TODO change this ???
put_string(next, string_type(of_string));
next = a_fill; //TODO change this ???
facet.put(next, a_ios, a_fill, nkd.month());
return next;
}
//! Put a first_day_of_the_week_in_month => "first weekday of month"
template<class facet_type>
OutItrT put_first_kday(OutItrT next, std::ios_base& a_ios,
CharT a_fill, const first_kday_type& fkd,
const facet_type& facet) const
{
put_string(next, phrase_strings[first]);
next = a_fill; //TODO change this ???
facet.put(next, a_ios, a_fill, fkd.day_of_week());
next = a_fill; //TODO change this ???
put_string(next, string_type(of_string));
next = a_fill; //TODO change this ???
facet.put(next, a_ios, a_fill, fkd.month());
return next;
}
//! Put a last_day_of_the_week_in_month => "last weekday of month"
template<class facet_type>
OutItrT put_last_kday(OutItrT next, std::ios_base& a_ios,
CharT a_fill, const last_kday_type& lkd,
const facet_type& facet) const
{
put_string(next, phrase_strings[last]);
next = a_fill; //TODO change this ???
facet.put(next, a_ios, a_fill, lkd.day_of_week());
next = a_fill; //TODO change this ???
put_string(next, string_type(of_string));
next = a_fill; //TODO change this ???
facet.put(next, a_ios, a_fill, lkd.month());
return next;
}
//! Put a first_day_of_the_week_before => "weekday before"
template<class facet_type>
OutItrT put_kday_before(OutItrT next, std::ios_base& a_ios,
CharT a_fill, const kday_before_type& fkb,
const facet_type& facet) const
{
facet.put(next, a_ios, a_fill, fkb.day_of_week());
next = a_fill; //TODO change this ???
put_string(next, phrase_strings[before]);
return next;
}
//! Put a first_day_of_the_week_after => "weekday after"
template<class facet_type>
OutItrT put_kday_after(OutItrT next, std::ios_base& a_ios,
CharT a_fill, const kday_after_type& fka,
const facet_type& facet) const
{
facet.put(next, a_ios, a_fill, fka.day_of_week());
next = a_fill; //TODO change this ???
put_string(next, phrase_strings[after]);
return next;
}
private:
collection_type phrase_strings;
//! helper function to put the various member string into stream
OutItrT put_string(OutItrT next, const string_type& str) const
{
typename string_type::const_iterator itr = str.begin();
while(itr != str.end()) {
*next = *itr;
++itr;
++next;
}
return next;
}
};
template<class date_type, class CharT, class OutItrT>
const typename date_generator_formatter<date_type, CharT, OutItrT>::char_type
date_generator_formatter<date_type, CharT, OutItrT>::first_string[6] =
{'f','i','r','s','t'};
template<class date_type, class CharT, class OutItrT>
const typename date_generator_formatter<date_type, CharT, OutItrT>::char_type
date_generator_formatter<date_type, CharT, OutItrT>::second_string[7] =
{'s','e','c','o','n','d'};
template<class date_type, class CharT, class OutItrT>
const typename date_generator_formatter<date_type, CharT, OutItrT>::char_type
date_generator_formatter<date_type, CharT, OutItrT>::third_string[6] =
{'t','h','i','r','d'};
template<class date_type, class CharT, class OutItrT>
const typename date_generator_formatter<date_type, CharT, OutItrT>::char_type
date_generator_formatter<date_type, CharT, OutItrT>::fourth_string[7] =
{'f','o','u','r','t','h'};
template<class date_type, class CharT, class OutItrT>
const typename date_generator_formatter<date_type, CharT, OutItrT>::char_type
date_generator_formatter<date_type, CharT, OutItrT>::fifth_string[6] =
{'f','i','f','t','h'};
template<class date_type, class CharT, class OutItrT>
const typename date_generator_formatter<date_type, CharT, OutItrT>::char_type
date_generator_formatter<date_type, CharT, OutItrT>::last_string[5] =
{'l','a','s','t'};
template<class date_type, class CharT, class OutItrT>
const typename date_generator_formatter<date_type, CharT, OutItrT>::char_type
date_generator_formatter<date_type, CharT, OutItrT>::before_string[8] =
{'b','e','f','o','r','e'};
template<class date_type, class CharT, class OutItrT>
const typename date_generator_formatter<date_type, CharT, OutItrT>::char_type
date_generator_formatter<date_type, CharT, OutItrT>::after_string[6] =
{'a','f','t','e','r'};
template<class date_type, class CharT, class OutItrT>
const typename date_generator_formatter<date_type, CharT, OutItrT>::char_type
date_generator_formatter<date_type, CharT, OutItrT>::of_string[3] =
{'o','f'};
} } // namespaces
#endif // _DATE_TIME_DATE_GENERATOR_FORMATTER__HPP___

View File

@@ -0,0 +1,330 @@
#ifndef DATE_TIME_DATE_GENERATOR_PARSER_HPP__
#define DATE_TIME_DATE_GENERATOR_PARSER_HPP__
/* Copyright (c) 2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <string>
#include <vector>
#include <iterator> // istreambuf_iterator
#include <boost/throw_exception.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/string_parse_tree.hpp>
#include <boost/date_time/date_generators.hpp>
#include <boost/date_time/format_date_parser.hpp>
namespace boost { namespace date_time {
//! Class for date_generator parsing
/*! The elements of a date_generator "phrase" are parsed from the input stream in a
* particular order. All elements are required and the order in which they appear
* cannot change, however, the elements themselves can be changed. The default
* elements and their order are as follows:
*
* - partial_date => "dd Month"
* - nth_day_of_the_week_in_month => "nth weekday of month"
* - first_day_of_the_week_in_month => "first weekday of month"
* - last_day_of_the_week_in_month => "last weekday of month"
* - first_day_of_the_week_after => "weekday after"
* - first_day_of_the_week_before => "weekday before"
*
* Weekday and Month names and formats are handled via the date_input_facet.
*
*/
template<class date_type, typename charT>
class date_generator_parser
{
public:
typedef std::basic_string<charT> string_type;
typedef std::istreambuf_iterator<charT> stream_itr_type;
typedef typename date_type::month_type month_type;
typedef typename date_type::day_of_week_type day_of_week_type;
typedef typename date_type::day_type day_type;
typedef string_parse_tree<charT> parse_tree_type;
typedef typename parse_tree_type::parse_match_result_type match_results;
typedef std::vector<std::basic_string<charT> > collection_type;
typedef partial_date<date_type> partial_date_type;
typedef nth_kday_of_month<date_type> nth_kday_type;
typedef first_kday_of_month<date_type> first_kday_type;
typedef last_kday_of_month<date_type> last_kday_type;
typedef first_kday_after<date_type> kday_after_type;
typedef first_kday_before<date_type> kday_before_type;
typedef charT char_type;
static const char_type first_string[6];
static const char_type second_string[7];
static const char_type third_string[6];
static const char_type fourth_string[7];
static const char_type fifth_string[6];
static const char_type last_string[5];
static const char_type before_string[8];
static const char_type after_string[6];
static const char_type of_string[3];
enum phrase_elements {first=0, second, third, fourth, fifth, last,
before, after, of, number_of_phrase_elements};
//! Creates a date_generator_parser with the default set of "element_strings"
date_generator_parser()
{
element_strings(string_type(first_string),
string_type(second_string),
string_type(third_string),
string_type(fourth_string),
string_type(fifth_string),
string_type(last_string),
string_type(before_string),
string_type(after_string),
string_type(of_string));
}
//! Creates a date_generator_parser using a user defined set of element strings
date_generator_parser(const string_type& first_str,
const string_type& second_str,
const string_type& third_str,
const string_type& fourth_str,
const string_type& fifth_str,
const string_type& last_str,
const string_type& before_str,
const string_type& after_str,
const string_type& of_str)
{
element_strings(first_str, second_str, third_str, fourth_str, fifth_str,
last_str, before_str, after_str, of_str);
}
//! Replace strings that determine nth week for generator
void element_strings(const string_type& first_str,
const string_type& second_str,
const string_type& third_str,
const string_type& fourth_str,
const string_type& fifth_str,
const string_type& last_str,
const string_type& before_str,
const string_type& after_str,
const string_type& of_str)
{
collection_type phrases;
phrases.push_back(first_str);
phrases.push_back(second_str);
phrases.push_back(third_str);
phrases.push_back(fourth_str);
phrases.push_back(fifth_str);
phrases.push_back(last_str);
phrases.push_back(before_str);
phrases.push_back(after_str);
phrases.push_back(of_str);
m_element_strings = parse_tree_type(phrases, this->first); // enum first
}
void element_strings(const collection_type& col)
{
m_element_strings = parse_tree_type(col, this->first); // enum first
}
//! returns partial_date parsed from stream
template<class facet_type>
partial_date_type
get_partial_date_type(stream_itr_type& sitr,
stream_itr_type& stream_end,
std::ios_base& a_ios,
const facet_type& facet) const
{
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
day_type d(1);
month_type m(1);
facet.get(sitr, stream_end, a_ios, d);
facet.get(sitr, stream_end, a_ios, m);
return partial_date_type(d,m);
}
//! returns nth_kday_of_week parsed from stream
template<class facet_type>
nth_kday_type
get_nth_kday_type(stream_itr_type& sitr,
stream_itr_type& stream_end,
std::ios_base& a_ios,
const facet_type& facet) const
{
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
typename nth_kday_type::week_num wn;
day_of_week_type wd(0); // no default constructor
month_type m(1); // no default constructor
match_results mr = m_element_strings.match(sitr, stream_end);
switch(mr.current_match) {
case first : { wn = nth_kday_type::first; break; }
case second : { wn = nth_kday_type::second; break; }
case third : { wn = nth_kday_type::third; break; }
case fourth : { wn = nth_kday_type::fourth; break; }
case fifth : { wn = nth_kday_type::fifth; break; }
default:
{
boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'"));
BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(wn = nth_kday_type::first);
}
} // week num
facet.get(sitr, stream_end, a_ios, wd); // day_of_week
extract_element(sitr, stream_end, of); // "of" element
facet.get(sitr, stream_end, a_ios, m); // month
return nth_kday_type(wn, wd, m);
}
//! returns first_kday_of_week parsed from stream
template<class facet_type>
first_kday_type
get_first_kday_type(stream_itr_type& sitr,
stream_itr_type& stream_end,
std::ios_base& a_ios,
const facet_type& facet) const
{
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
day_of_week_type wd(0); // no default constructor
month_type m(1); // no default constructor
extract_element(sitr, stream_end, first); // "first" element
facet.get(sitr, stream_end, a_ios, wd); // day_of_week
extract_element(sitr, stream_end, of); // "of" element
facet.get(sitr, stream_end, a_ios, m); // month
return first_kday_type(wd, m);
}
//! returns last_kday_of_week parsed from stream
template<class facet_type>
last_kday_type
get_last_kday_type(stream_itr_type& sitr,
stream_itr_type& stream_end,
std::ios_base& a_ios,
const facet_type& facet) const
{
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
day_of_week_type wd(0); // no default constructor
month_type m(1); // no default constructor
extract_element(sitr, stream_end, last); // "last" element
facet.get(sitr, stream_end, a_ios, wd); // day_of_week
extract_element(sitr, stream_end, of); // "of" element
facet.get(sitr, stream_end, a_ios, m); // month
return last_kday_type(wd, m);
}
//! returns first_kday_of_week parsed from stream
template<class facet_type>
kday_before_type
get_kday_before_type(stream_itr_type& sitr,
stream_itr_type& stream_end,
std::ios_base& a_ios,
const facet_type& facet) const
{
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
day_of_week_type wd(0); // no default constructor
facet.get(sitr, stream_end, a_ios, wd); // day_of_week
extract_element(sitr, stream_end, before);// "before" element
return kday_before_type(wd);
}
//! returns first_kday_of_week parsed from stream
template<class facet_type>
kday_after_type
get_kday_after_type(stream_itr_type& sitr,
stream_itr_type& stream_end,
std::ios_base& a_ios,
const facet_type& facet) const
{
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
day_of_week_type wd(0); // no default constructor
facet.get(sitr, stream_end, a_ios, wd); // day_of_week
extract_element(sitr, stream_end, after); // "after" element
return kday_after_type(wd);
}
private:
parse_tree_type m_element_strings;
//! Extracts phrase element from input. Throws ios_base::failure on error.
void extract_element(stream_itr_type& sitr,
stream_itr_type& stream_end,
typename date_generator_parser::phrase_elements ele) const
{
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
match_results mr = m_element_strings.match(sitr, stream_end);
if(mr.current_match != ele) {
boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'"));
}
}
};
template<class date_type, class CharT>
const typename date_generator_parser<date_type, CharT>::char_type
date_generator_parser<date_type, CharT>::first_string[6] =
{'f','i','r','s','t'};
template<class date_type, class CharT>
const typename date_generator_parser<date_type, CharT>::char_type
date_generator_parser<date_type, CharT>::second_string[7] =
{'s','e','c','o','n','d'};
template<class date_type, class CharT>
const typename date_generator_parser<date_type, CharT>::char_type
date_generator_parser<date_type, CharT>::third_string[6] =
{'t','h','i','r','d'};
template<class date_type, class CharT>
const typename date_generator_parser<date_type, CharT>::char_type
date_generator_parser<date_type, CharT>::fourth_string[7] =
{'f','o','u','r','t','h'};
template<class date_type, class CharT>
const typename date_generator_parser<date_type, CharT>::char_type
date_generator_parser<date_type, CharT>::fifth_string[6] =
{'f','i','f','t','h'};
template<class date_type, class CharT>
const typename date_generator_parser<date_type, CharT>::char_type
date_generator_parser<date_type, CharT>::last_string[5] =
{'l','a','s','t'};
template<class date_type, class CharT>
const typename date_generator_parser<date_type, CharT>::char_type
date_generator_parser<date_type, CharT>::before_string[8] =
{'b','e','f','o','r','e'};
template<class date_type, class CharT>
const typename date_generator_parser<date_type, CharT>::char_type
date_generator_parser<date_type, CharT>::after_string[6] =
{'a','f','t','e','r'};
template<class date_type, class CharT>
const typename date_generator_parser<date_type, CharT>::char_type
date_generator_parser<date_type, CharT>::of_string[3] =
{'o','f'};
} } //namespace
#endif // DATE_TIME_DATE_GENERATOR_PARSER_HPP__

View File

@@ -0,0 +1,514 @@
#ifndef DATE_TIME_DATE_GENERATORS_HPP__
#define DATE_TIME_DATE_GENERATORS_HPP__
/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
/*! @file date_generators.hpp
Definition and implementation of date algorithm templates
*/
#include <sstream>
#include <stdexcept>
#include <boost/throw_exception.hpp>
#include <boost/date_time/date.hpp>
#include <boost/date_time/compiler_config.hpp>
namespace boost {
namespace date_time {
//! Base class for all generators that take a year and produce a date.
/*! This class is a base class for polymorphic function objects that take
a year and produce a concrete date.
@tparam date_type The type representing a date. This type must
export a calender_type which defines a year_type.
*/
template<class date_type>
class year_based_generator
{
public:
typedef typename date_type::calendar_type calendar_type;
typedef typename calendar_type::year_type year_type;
year_based_generator() {}
virtual ~year_based_generator() {}
virtual date_type get_date(year_type y) const = 0;
//! Returns a string for use in a POSIX time_zone string
virtual std::string to_string() const = 0;
};
//! Generates a date by applying the year to the given month and day.
/*!
Example usage:
@code
partial_date pd(1, Jan);
partial_date pd2(70);
date d = pd.get_date(2002); //2002-Jan-01
date d2 = pd2.get_date(2002); //2002-Mar-10
@endcode
\ingroup date_alg
*/
template<class date_type>
class partial_date : public year_based_generator<date_type>
{
public:
typedef typename date_type::calendar_type calendar_type;
typedef typename calendar_type::day_type day_type;
typedef typename calendar_type::month_type month_type;
typedef typename calendar_type::year_type year_type;
typedef typename date_type::duration_type duration_type;
typedef typename duration_type::duration_rep duration_rep;
partial_date(day_type d, month_type m) :
day_(d),
month_(m)
{}
//! Partial date created from number of days into year. Range 1-366
/*! Allowable values range from 1 to 366. 1=Jan1, 366=Dec31. If argument
* exceeds range, partial_date will be created with closest in-range value.
* 60 will always be Feb29, if get_date() is called with a non-leap year
* an exception will be thrown */
partial_date(duration_rep days) :
day_(1), // default values
month_(1)
{
date_type d1(2000,1,1);
if(days > 1) {
if(days > 366) // prevents wrapping
{
days = 366;
}
days = days - 1;
duration_type dd(days);
d1 = d1 + dd;
}
day_ = d1.day();
month_ = d1.month();
}
//! Return a concrete date when provided with a year specific year.
/*! Will throw an 'invalid_argument' exception if a partial_date object,
* instantiated with Feb-29, has get_date called with a non-leap year.
* Example:
* @code
* partial_date pd(29, Feb);
* pd.get_date(2003); // throws invalid_argument exception
* pg.get_date(2000); // returns 2000-2-29
* @endcode
*/
date_type get_date(year_type y) const BOOST_OVERRIDE
{
if((day_ == 29) && (month_ == 2) && !(calendar_type::is_leap_year(y))) {
std::ostringstream ss;
ss << "No Feb 29th in given year of " << y << ".";
boost::throw_exception(std::invalid_argument(ss.str()));
}
return date_type(y, month_, day_);
}
date_type operator()(year_type y) const
{
return get_date(y);
//return date_type(y, month_, day_);
}
bool operator==(const partial_date& rhs) const
{
return (month_ == rhs.month_) && (day_ == rhs.day_);
}
bool operator<(const partial_date& rhs) const
{
if (month_ < rhs.month_) return true;
if (month_ > rhs.month_) return false;
//months are equal
return (day_ < rhs.day_);
}
// added for streaming purposes
month_type month() const
{
return month_;
}
day_type day() const
{
return day_;
}
//! Returns string suitable for use in POSIX time zone string
/*! Returns string formatted with up to 3 digits:
* Jan-01 == "0"
* Feb-29 == "58"
* Dec-31 == "365" */
std::string to_string() const BOOST_OVERRIDE
{
std::ostringstream ss;
date_type d(2004, month_, day_);
unsigned short c = d.day_of_year();
c--; // numbered 0-365 while day_of_year is 1 based...
ss << c;
return ss.str();
}
private:
day_type day_;
month_type month_;
};
//! Returns nth arg as string. 1 -> "first", 2 -> "second", max is 5.
inline const char* nth_as_str(int ele)
{
static const char* const _nth_as_str[] = {"out of range", "first", "second",
"third", "fourth", "fifth"};
if(ele >= 1 && ele <= 5) {
return _nth_as_str[ele];
}
else {
return _nth_as_str[0];
}
}
//! Useful generator functor for finding holidays
/*! Based on the idea in Cal. Calc. for finding holidays that are
* the 'first Monday of September'. When instantiated with
* 'fifth' kday of month, the result will be the last kday of month
* which can be the fourth or fifth depending on the structure of
* the month.
*
* The algorithm here basically guesses for the first
* day of the month. Then finds the first day of the correct
* type. That is, if the first of the month is a Tuesday
* and it needs Wednesday then we simply increment by a day
* and then we can add the length of a week until we get
* to the 'nth kday'. There are probably more efficient
* algorithms based on using a mod 7, but this one works
* reasonably well for basic applications.
* \ingroup date_alg
*/
template<class date_type>
class nth_kday_of_month : public year_based_generator<date_type>
{
public:
typedef typename date_type::calendar_type calendar_type;
typedef typename calendar_type::day_of_week_type day_of_week_type;
typedef typename calendar_type::month_type month_type;
typedef typename calendar_type::year_type year_type;
typedef typename date_type::duration_type duration_type;
enum week_num {first=1, second, third, fourth, fifth};
nth_kday_of_month(week_num week_no,
day_of_week_type dow,
month_type m) :
month_(m),
wn_(week_no),
dow_(dow)
{}
//! Return a concrete date when provided with a year specific year.
date_type get_date(year_type y) const BOOST_OVERRIDE
{
date_type d(y, month_, 1); //first day of month
duration_type one_day(1);
duration_type one_week(7);
while (dow_ != d.day_of_week()) {
d = d + one_day;
}
int week = 1;
while (week < wn_) {
d = d + one_week;
week++;
}
// remove wrapping to next month behavior
if(d.month() != month_) {
d = d - one_week;
}
return d;
}
// added for streaming
month_type month() const
{
return month_;
}
week_num nth_week() const
{
return wn_;
}
day_of_week_type day_of_week() const
{
return dow_;
}
const char* nth_week_as_str() const
{
return nth_as_str(wn_);
}
//! Returns string suitable for use in POSIX time zone string
/*! Returns a string formatted as "M4.3.0" ==> 3rd Sunday in April. */
std::string to_string() const BOOST_OVERRIDE
{
std::ostringstream ss;
ss << 'M'
<< static_cast<int>(month_) << '.'
<< static_cast<int>(wn_) << '.'
<< static_cast<int>(dow_);
return ss.str();
}
private:
month_type month_;
week_num wn_;
day_of_week_type dow_;
};
//! Useful generator functor for finding holidays and daylight savings
/*! Similar to nth_kday_of_month, but requires less paramters
* \ingroup date_alg
*/
template<class date_type>
class first_kday_of_month : public year_based_generator<date_type>
{
public:
typedef typename date_type::calendar_type calendar_type;
typedef typename calendar_type::day_of_week_type day_of_week_type;
typedef typename calendar_type::month_type month_type;
typedef typename calendar_type::year_type year_type;
typedef typename date_type::duration_type duration_type;
//!Specify the first 'Sunday' in 'April' spec
/*!@param dow The day of week, eg: Sunday, Monday, etc
* @param m The month of the year, eg: Jan, Feb, Mar, etc
*/
first_kday_of_month(day_of_week_type dow, month_type m) :
month_(m),
dow_(dow)
{}
//! Return a concrete date when provided with a year specific year.
date_type get_date(year_type year) const BOOST_OVERRIDE
{
date_type d(year, month_,1);
duration_type one_day(1);
while (dow_ != d.day_of_week()) {
d = d + one_day;
}
return d;
}
// added for streaming
month_type month() const
{
return month_;
}
day_of_week_type day_of_week() const
{
return dow_;
}
//! Returns string suitable for use in POSIX time zone string
/*! Returns a string formatted as "M4.1.0" ==> 1st Sunday in April. */
std::string to_string() const BOOST_OVERRIDE
{
std::ostringstream ss;
ss << 'M'
<< static_cast<int>(month_) << '.'
<< 1 << '.'
<< static_cast<int>(dow_);
return ss.str();
}
private:
month_type month_;
day_of_week_type dow_;
};
//! Calculate something like Last Sunday of January
/*! Useful generator functor for finding holidays and daylight savings
* Get the last day of the month and then calculate the difference
* to the last previous day.
* @tparam date_type A date class that exports day_of_week, month_type, etc.
* \ingroup date_alg
*/
template<class date_type>
class last_kday_of_month : public year_based_generator<date_type>
{
public:
typedef typename date_type::calendar_type calendar_type;
typedef typename calendar_type::day_of_week_type day_of_week_type;
typedef typename calendar_type::month_type month_type;
typedef typename calendar_type::year_type year_type;
typedef typename date_type::duration_type duration_type;
//!Specify the date spec like last 'Sunday' in 'April' spec
/*!@param dow The day of week, eg: Sunday, Monday, etc
* @param m The month of the year, eg: Jan, Feb, Mar, etc
*/
last_kday_of_month(day_of_week_type dow, month_type m) :
month_(m),
dow_(dow)
{}
//! Return a concrete date when provided with a year specific year.
date_type get_date(year_type year) const BOOST_OVERRIDE
{
date_type d(year, month_, calendar_type::end_of_month_day(year,month_));
duration_type one_day(1);
while (dow_ != d.day_of_week()) {
d = d - one_day;
}
return d;
}
// added for streaming
month_type month() const
{
return month_;
}
day_of_week_type day_of_week() const
{
return dow_;
}
//! Returns string suitable for use in POSIX time zone string
/*! Returns a string formatted as "M4.5.0" ==> last Sunday in April. */
std::string to_string() const BOOST_OVERRIDE
{
std::ostringstream ss;
ss << 'M'
<< static_cast<int>(month_) << '.'
<< 5 << '.'
<< static_cast<int>(dow_);
return ss.str();
}
private:
month_type month_;
day_of_week_type dow_;
};
//! Calculate something like "First Sunday after Jan 1,2002
/*! Date generator that takes a date and finds kday after
*@code
typedef boost::date_time::first_kday_after<date> firstkdayafter;
firstkdayafter fkaf(Monday);
fkaf.get_date(date(2002,Feb,1));
@endcode
* \ingroup date_alg
*/
template<class date_type>
class first_kday_after
{
public:
typedef typename date_type::calendar_type calendar_type;
typedef typename calendar_type::day_of_week_type day_of_week_type;
typedef typename date_type::duration_type duration_type;
first_kday_after(day_of_week_type dow) :
dow_(dow)
{}
//! Return next kday given.
date_type get_date(date_type start_day) const
{
duration_type one_day(1);
date_type d = start_day + one_day;
while (dow_ != d.day_of_week()) {
d = d + one_day;
}
return d;
}
// added for streaming
day_of_week_type day_of_week() const
{
return dow_;
}
private:
day_of_week_type dow_;
};
//! Calculate something like "First Sunday before Jan 1,2002
/*! Date generator that takes a date and finds kday after
*@code
typedef boost::date_time::first_kday_before<date> firstkdaybefore;
firstkdaybefore fkbf(Monday);
fkbf.get_date(date(2002,Feb,1));
@endcode
* \ingroup date_alg
*/
template<class date_type>
class first_kday_before
{
public:
typedef typename date_type::calendar_type calendar_type;
typedef typename calendar_type::day_of_week_type day_of_week_type;
typedef typename date_type::duration_type duration_type;
first_kday_before(day_of_week_type dow) :
dow_(dow)
{}
//! Return next kday given.
date_type get_date(date_type start_day) const
{
duration_type one_day(1);
date_type d = start_day - one_day;
while (dow_ != d.day_of_week()) {
d = d - one_day;
}
return d;
}
// added for streaming
day_of_week_type day_of_week() const
{
return dow_;
}
private:
day_of_week_type dow_;
};
//! Calculates the number of days until the next weekday
/*! Calculates the number of days until the next weekday.
* If the date given falls on a Sunday and the given weekday
* is Tuesday the result will be 2 days */
template<typename date_type, class weekday_type>
inline
typename date_type::duration_type days_until_weekday(const date_type& d, const weekday_type& wd)
{
typedef typename date_type::duration_type duration_type;
duration_type wks(0);
duration_type dd(wd.as_number() - d.day_of_week().as_number());
if(dd.is_negative()){
wks = duration_type(7);
}
return dd + wks;
}
//! Calculates the number of days since the previous weekday
/*! Calculates the number of days since the previous weekday
* If the date given falls on a Sunday and the given weekday
* is Tuesday the result will be 5 days. The answer will be a positive
* number because Tuesday is 5 days before Sunday, not -5 days before. */
template<typename date_type, class weekday_type>
inline
typename date_type::duration_type days_before_weekday(const date_type& d, const weekday_type& wd)
{
typedef typename date_type::duration_type duration_type;
duration_type wks(0);
duration_type dd(wd.as_number() - d.day_of_week().as_number());
if(dd.days() > 0){
wks = duration_type(7);
}
// we want a number of days, not an offset. The value returned must
// be zero or larger.
return (-dd + wks);
}
//! Generates a date object representing the date of the following weekday from the given date
/*! Generates a date object representing the date of the following
* weekday from the given date. If the date given is 2004-May-9
* (a Sunday) and the given weekday is Tuesday then the resulting date
* will be 2004-May-11. */
template<class date_type, class weekday_type>
inline
date_type next_weekday(const date_type& d, const weekday_type& wd)
{
return d + days_until_weekday(d, wd);
}
//! Generates a date object representing the date of the previous weekday from the given date
/*! Generates a date object representing the date of the previous
* weekday from the given date. If the date given is 2004-May-9
* (a Sunday) and the given weekday is Tuesday then the resulting date
* will be 2004-May-4. */
template<class date_type, class weekday_type>
inline
date_type previous_weekday(const date_type& d, const weekday_type& wd)
{
return d - days_before_weekday(d, wd);
}
} } //namespace date_time
#endif

View File

@@ -0,0 +1,101 @@
#ifndef DATE_ITERATOR_HPP___
#define DATE_ITERATOR_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <iterator>
namespace boost {
namespace date_time {
//! An iterator over dates with varying resolution (day, week, month, year, etc)
enum date_resolutions {day, week, months, year, decade, century, NumDateResolutions};
//! Base date iterator type
/*! This class provides the skeleton for the creation of iterators.
* New and interesting interators can be created by plugging in a new
* function that derives the next value from the current state.
* generation of various types of -based information.
*
* <b>Template Parameters</b>
*
* <b>date_type</b>
*
* The date_type is a concrete date_type. The date_type must
* define a duration_type and a calendar_type.
*/
template<class date_type>
class date_itr_base {
// works, but benefit unclear at the moment
// class date_itr_base : public std::iterator<std::input_iterator_tag,
// date_type, void, void, void>{
public:
typedef typename date_type::duration_type duration_type;
typedef date_type value_type;
typedef std::input_iterator_tag iterator_category;
date_itr_base(date_type d) : current_(d) {}
virtual ~date_itr_base() {}
date_itr_base& operator++()
{
current_ = current_ + get_offset(current_);
return *this;
}
date_itr_base& operator--()
{
current_ = current_ + get_neg_offset(current_);
return *this;
}
virtual duration_type get_offset(const date_type& current) const=0;
virtual duration_type get_neg_offset(const date_type& current) const=0;
const date_type& operator*() const {return current_;}
const date_type* operator->() const {return &current_;}
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_;
};
//! Overrides the base date iterator providing hook for functors
/*
* <b>offset_functor</b>
*
* The offset functor must define a get_offset function that takes the
* current point in time and calculates and offset.
*
*/
template<class offset_functor, class date_type>
class date_itr : public date_itr_base<date_type> {
public:
typedef typename date_type::duration_type duration_type;
date_itr(date_type d, int factor=1) :
date_itr_base<date_type>(d),
of_(factor)
{}
private:
virtual duration_type get_offset(const date_type& current) const
{
return of_.get_offset(current);
}
virtual duration_type get_neg_offset(const date_type& current) const
{
return of_.get_neg_offset(current);
}
offset_functor of_;
};
} } //namespace date_time
#endif

View File

@@ -0,0 +1,321 @@
#ifndef DATE_TIME_DATE_NAMES_PUT_HPP___
#define DATE_TIME_DATE_NAMES_PUT_HPP___
/* Copyright (c) 2002-2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <boost/date_time/locale_config.hpp> // set BOOST_DATE_TIME_NO_LOCALE
#ifndef BOOST_DATE_TIME_NO_LOCALE
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/special_defs.hpp>
#include <boost/date_time/date_defs.hpp>
#include <boost/date_time/parse_format_base.hpp>
#include <boost/lexical_cast.hpp>
#include <locale>
namespace boost {
namespace date_time {
//! Output facet base class for gregorian dates.
/*! This class is a base class for date facets used to localize the
* names of months and the names of days in the week.
*
* Requirements of Config
* - define an enumeration month_enum that enumerates the months.
* The enumeration should be '1' based eg: Jan==1
* - define as_short_string and as_long_string
*
* (see langer & kreft p334).
*
*/
template<class Config,
class charT = char,
class OutputIterator = std::ostreambuf_iterator<charT> >
class BOOST_SYMBOL_VISIBLE date_names_put : public std::locale::facet
{
public:
date_names_put() {}
typedef OutputIterator iter_type;
typedef typename Config::month_type month_type;
typedef typename Config::month_enum month_enum;
typedef typename Config::weekday_enum weekday_enum;
typedef typename Config::special_value_enum special_value_enum;
//typedef typename Config::format_type format_type;
typedef std::basic_string<charT> string_type;
typedef charT char_type;
static const char_type default_special_value_names[3][17];
static const char_type separator[2];
static std::locale::id id;
#if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
std::locale::id& __get_id (void) const { return id; }
#endif
void put_special_value(iter_type& oitr, special_value_enum sv) const
{
do_put_special_value(oitr, sv);
}
void put_month_short(iter_type& oitr, month_enum moy) const
{
do_put_month_short(oitr, moy);
}
void put_month_long(iter_type& oitr, month_enum moy) const
{
do_put_month_long(oitr, moy);
}
void put_weekday_short(iter_type& oitr, weekday_enum wd) const
{
do_put_weekday_short(oitr, wd);
}
void put_weekday_long(iter_type& oitr, weekday_enum wd) const
{
do_put_weekday_long(oitr, wd);
}
bool has_date_sep_chars() const
{
return do_has_date_sep_chars();
}
void year_sep_char(iter_type& oitr) const
{
do_year_sep_char(oitr);
}
//! char between year-month
void month_sep_char(iter_type& oitr) const
{
do_month_sep_char(oitr);
}
//! Char to separate month-day
void day_sep_char(iter_type& oitr) const
{
do_day_sep_char(oitr);
}
//! Determines the order to put the date elements
ymd_order_spec date_order() const
{
return do_date_order();
}
//! Determines if month is displayed as integer, short or long string
month_format_spec month_format() const
{
return do_month_format();
}
protected:
//! Default facet implementation uses month_type defaults
virtual void do_put_month_short(iter_type& oitr, month_enum moy) const
{
month_type gm(moy);
charT c = '\0';
put_string(oitr, gm.as_short_string(c));
}
//! Default facet implementation uses month_type defaults
virtual void do_put_month_long(iter_type& oitr,
month_enum moy) const
{
month_type gm(moy);
charT c = '\0';
put_string(oitr, gm.as_long_string(c));
}
//! Default facet implementation for special value types
virtual void do_put_special_value(iter_type& oitr, special_value_enum sv) const
{
if(sv <= 2) { // only output not_a_date_time, neg_infin, or pos_infin
string_type s(default_special_value_names[sv]);
put_string(oitr, s);
}
}
virtual void do_put_weekday_short(iter_type&, weekday_enum) const
{
}
virtual void do_put_weekday_long(iter_type&, weekday_enum) const
{
}
virtual bool do_has_date_sep_chars() const
{
return true;
}
virtual void do_year_sep_char(iter_type& oitr) const
{
string_type s(separator);
put_string(oitr, s);
}
//! char between year-month
virtual void do_month_sep_char(iter_type& oitr) const
{
string_type s(separator);
put_string(oitr, s);
}
//! Char to separate month-day
virtual void do_day_sep_char(iter_type& oitr) const
{
string_type s(separator); //put in '-'
put_string(oitr, s);
}
//! Default for date order
virtual ymd_order_spec do_date_order() const
{
return ymd_order_iso;
}
//! Default month format
virtual month_format_spec do_month_format() const
{
return month_as_short_string;
}
void put_string(iter_type& oi, const charT* const s) const
{
string_type s1(boost::lexical_cast<string_type>(s));
typename string_type::iterator si,end;
for (si=s1.begin(), end=s1.end(); si!=end; si++, oi++) {
*oi = *si;
}
}
void put_string(iter_type& oi, const string_type& s1) const
{
typename string_type::const_iterator si,end;
for (si=s1.begin(), end=s1.end(); si!=end; si++, oi++) {
*oi = *si;
}
}
};
template<class Config, class charT, class OutputIterator>
const typename date_names_put<Config, charT, OutputIterator>::char_type
date_names_put<Config, charT, OutputIterator>::default_special_value_names[3][17] = {
{'n','o','t','-','a','-','d','a','t','e','-','t','i','m','e'},
{'-','i','n','f','i','n','i','t','y'},
{'+','i','n','f','i','n','i','t','y'} };
template<class Config, class charT, class OutputIterator>
const typename date_names_put<Config, charT, OutputIterator>::char_type
date_names_put<Config, charT, OutputIterator>::separator[2] =
{'-', '\0'} ;
//! Generate storage location for a std::locale::id
template<class Config, class charT, class OutputIterator>
std::locale::id date_names_put<Config, charT, OutputIterator>::id;
//! A date name output facet that takes an array of char* to define strings
template<class Config,
class charT = char,
class OutputIterator = std::ostreambuf_iterator<charT> >
class BOOST_SYMBOL_VISIBLE all_date_names_put : public date_names_put<Config, charT, OutputIterator>
{
public:
all_date_names_put(const charT* const month_short_names[],
const charT* const month_long_names[],
const charT* const special_value_names[],
const charT* const weekday_short_names[],
const charT* const weekday_long_names[],
charT separator_char = '-',
ymd_order_spec order_spec = ymd_order_iso,
month_format_spec month_format = month_as_short_string) :
month_short_names_(month_short_names),
month_long_names_(month_long_names),
special_value_names_(special_value_names),
weekday_short_names_(weekday_short_names),
weekday_long_names_(weekday_long_names),
order_spec_(order_spec),
month_format_spec_(month_format)
{
separator_char_[0] = separator_char;
separator_char_[1] = '\0';
}
typedef OutputIterator iter_type;
typedef typename Config::month_enum month_enum;
typedef typename Config::weekday_enum weekday_enum;
typedef typename Config::special_value_enum special_value_enum;
const charT* const* get_short_month_names() const
{
return month_short_names_;
}
const charT* const* get_long_month_names() const
{
return month_long_names_;
}
const charT* const* get_special_value_names() const
{
return special_value_names_;
}
const charT* const* get_short_weekday_names()const
{
return weekday_short_names_;
}
const charT* const* get_long_weekday_names()const
{
return weekday_long_names_;
}
protected:
//! Generic facet that takes array of chars
virtual void do_put_month_short(iter_type& oitr, month_enum moy) const
{
this->put_string(oitr, month_short_names_[moy-1]);
}
//! Long month names
virtual void do_put_month_long(iter_type& oitr, month_enum moy) const
{
this->put_string(oitr, month_long_names_[moy-1]);
}
//! Special values names
virtual void do_put_special_value(iter_type& oitr, special_value_enum sv) const
{
this->put_string(oitr, special_value_names_[sv]);
}
virtual void do_put_weekday_short(iter_type& oitr, weekday_enum wd) const
{
this->put_string(oitr, weekday_short_names_[wd]);
}
virtual void do_put_weekday_long(iter_type& oitr, weekday_enum wd) const
{
this->put_string(oitr, weekday_long_names_[wd]);
}
//! char between year-month
virtual void do_month_sep_char(iter_type& oitr) const
{
this->put_string(oitr, separator_char_);
}
//! Char to separate month-day
virtual void do_day_sep_char(iter_type& oitr) const
{
this->put_string(oitr, separator_char_);
}
//! Set the date ordering
virtual ymd_order_spec do_date_order() const
{
return order_spec_;
}
//! Set the date ordering
virtual month_format_spec do_month_format() const
{
return month_format_spec_;
}
private:
const charT* const* month_short_names_;
const charT* const* month_long_names_;
const charT* const* special_value_names_;
const charT* const* weekday_short_names_;
const charT* const* weekday_long_names_;
charT separator_char_[2];
ymd_order_spec order_spec_;
month_format_spec month_format_spec_;
};
} } //namespace boost::date_time
#endif //BOOST_NO_STD_LOCALE
#endif

View File

@@ -0,0 +1,342 @@
#ifndef _DATE_TIME_DATE_PARSING_HPP___
#define _DATE_TIME_DATE_PARSING_HPP___
/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <map>
#include <string>
#include <sstream>
#include <iterator>
#include <algorithm>
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/parse_format_base.hpp>
#include <boost/date_time/period.hpp>
#if defined(BOOST_DATE_TIME_NO_LOCALE)
#include <cctype> // ::tolower(int)
#else
#include <locale> // std::tolower(char, locale)
#endif
namespace boost {
namespace date_time {
//! A function to replace the std::transform( , , ,tolower) construct
/*! This function simply takes a string, and changes all the characters
* in that string to lowercase (according to the default system locale).
* In the event that a compiler does not support locales, the old
* C style tolower() is used.
*/
inline
std::string
convert_to_lower(std::string inp)
{
#if !defined(BOOST_DATE_TIME_NO_LOCALE)
const std::locale loc(std::locale::classic());
#endif
std::string::size_type i = 0, n = inp.length();
for (; i < n; ++i) {
inp[i] =
#if defined(BOOST_DATE_TIME_NO_LOCALE)
static_cast<char>(std::tolower(inp[i]));
#else
// tolower and others were brought in to std for borland >= v564
// in compiler_config.hpp
std::tolower(inp[i], loc);
#endif
}
return inp;
}
//! Helper function for parse_date.
template<class month_type>
inline unsigned short
month_str_to_ushort(std::string const& s) {
if((s.at(0) >= '0') && (s.at(0) <= '9')) {
return boost::lexical_cast<unsigned short>(s);
}
else {
std::string str = convert_to_lower(s);
//c++98 support
#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
static std::map<std::string, unsigned short> month_map;
typedef std::map<std::string, unsigned short>::value_type vtype;
if( month_map.empty() ) {
month_map.insert( vtype("jan", static_cast<unsigned short>(1)) );
month_map.insert( vtype("january", static_cast<unsigned short>(1)) );
month_map.insert( vtype("feb", static_cast<unsigned short>(2)) );
month_map.insert( vtype("february", static_cast<unsigned short>(2)) );
month_map.insert( vtype("mar", static_cast<unsigned short>(3)) );
month_map.insert( vtype("march", static_cast<unsigned short>(3)) );
month_map.insert( vtype("apr", static_cast<unsigned short>(4)) );
month_map.insert( vtype("april", static_cast<unsigned short>(4)) );
month_map.insert( vtype("may", static_cast<unsigned short>(5)) );
month_map.insert( vtype("jun", static_cast<unsigned short>(6)) );
month_map.insert( vtype("june", static_cast<unsigned short>(6)) );
month_map.insert( vtype("jul", static_cast<unsigned short>(7)) );
month_map.insert( vtype("july", static_cast<unsigned short>(7)) );
month_map.insert( vtype("aug", static_cast<unsigned short>(8)) );
month_map.insert( vtype("august", static_cast<unsigned short>(8)) );
month_map.insert( vtype("sep", static_cast<unsigned short>(9)) );
month_map.insert( vtype("september", static_cast<unsigned short>(9)) );
month_map.insert( vtype("oct", static_cast<unsigned short>(10)) );
month_map.insert( vtype("october", static_cast<unsigned short>(10)) );
month_map.insert( vtype("nov", static_cast<unsigned short>(11)) );
month_map.insert( vtype("november", static_cast<unsigned short>(11)) );
month_map.insert( vtype("dec", static_cast<unsigned short>(12)) );
month_map.insert( vtype("december", static_cast<unsigned short>(12)) );
}
#else //c+11 and beyond
static std::map<std::string, unsigned short> month_map =
{ { "jan", static_cast<unsigned short>(1) }, { "january", static_cast<unsigned short>(1) },
{ "feb", static_cast<unsigned short>(2) }, { "february", static_cast<unsigned short>(2) },
{ "mar", static_cast<unsigned short>(3) }, { "march", static_cast<unsigned short>(3) },
{ "apr", static_cast<unsigned short>(4) }, { "april", static_cast<unsigned short>(4) },
{ "may", static_cast<unsigned short>(5) },
{ "jun", static_cast<unsigned short>(6) }, { "june", static_cast<unsigned short>(6) },
{ "jul", static_cast<unsigned short>(7) }, { "july", static_cast<unsigned short>(7) },
{ "aug", static_cast<unsigned short>(8) }, { "august", static_cast<unsigned short>(8) },
{ "sep", static_cast<unsigned short>(9) }, { "september", static_cast<unsigned short>(9) },
{ "oct", static_cast<unsigned short>(10) }, { "october", static_cast<unsigned short>(10)},
{ "nov", static_cast<unsigned short>(11) }, { "november", static_cast<unsigned short>(11)},
{ "dec", static_cast<unsigned short>(12) }, { "december", static_cast<unsigned short>(12)}
};
#endif
std::map<std::string, unsigned short>::const_iterator mitr = month_map.find( str );
if ( mitr != month_map.end() ) {
return mitr->second;
}
}
return 13; // intentionally out of range - name not found
}
//! Generic function to parse a delimited date (eg: 2002-02-10)
/*! Accepted formats are: "2003-02-10" or " 2003-Feb-10" or
* "2003-Feburary-10"
* The order in which the Month, Day, & Year appear in the argument
* string can be accomodated by passing in the appropriate ymd_order_spec
*/
template<class date_type>
date_type
parse_date(const std::string& s, int order_spec = ymd_order_iso) {
std::string spec_str;
if(order_spec == ymd_order_iso) {
spec_str = "ymd";
}
else if(order_spec == ymd_order_dmy) {
spec_str = "dmy";
}
else { // (order_spec == ymd_order_us)
spec_str = "mdy";
}
typedef typename date_type::month_type month_type;
unsigned pos = 0;
unsigned short year(0), month(0), day(0);
typedef typename std::basic_string<char>::traits_type traits_type;
typedef boost::char_separator<char, traits_type> char_separator_type;
typedef boost::tokenizer<char_separator_type,
std::basic_string<char>::const_iterator,
std::basic_string<char> > tokenizer;
typedef boost::tokenizer<char_separator_type,
std::basic_string<char>::const_iterator,
std::basic_string<char> >::iterator tokenizer_iterator;
// may need more delimiters, these work for the regression tests
const char sep_char[] = {',','-','.',' ','/','\0'};
char_separator_type sep(sep_char);
tokenizer tok(s,sep);
for(tokenizer_iterator beg=tok.begin();
beg!=tok.end() && pos < spec_str.size();
++beg, ++pos) {
switch(spec_str.at(pos)) {
case 'y':
{
year = boost::lexical_cast<unsigned short>(*beg);
break;
}
case 'm':
{
month = month_str_to_ushort<month_type>(*beg);
break;
}
case 'd':
{
day = boost::lexical_cast<unsigned short>(*beg);
break;
}
default: break;
} //switch
}
return date_type(year, month, day);
}
//! Generic function to parse undelimited date (eg: 20020201)
template<class date_type>
date_type
parse_undelimited_date(const std::string& s) {
int offsets[] = {4,2,2};
int pos = 0;
//typename date_type::ymd_type ymd((year_type::min)(),1,1);
unsigned short y = 0, m = 0, d = 0;
/* The two bool arguments state that parsing will not wrap
* (only the first 8 characters will be parsed) and partial
* strings will not be parsed.
* Ex:
* "2005121" will parse 2005 & 12, but not the "1" */
boost::offset_separator osf(offsets, offsets+3, false, false);
typedef typename boost::tokenizer<boost::offset_separator,
std::basic_string<char>::const_iterator,
std::basic_string<char> > tokenizer_type;
tokenizer_type tok(s, osf);
for(typename tokenizer_type::iterator ti=tok.begin(); ti!=tok.end();++ti) {
unsigned short i = boost::lexical_cast<unsigned short>(*ti);
switch(pos) {
case 0: y = i; break;
case 1: m = i; break;
case 2: d = i; break;
default: break;
}
pos++;
}
return date_type(y,m,d);
}
//! Helper function for 'date gregorian::from_stream()'
/*! Creates a string from the iterators that reference the
* begining & end of a char[] or string. All elements are
* used in output string */
template<class date_type, class iterator_type>
inline
date_type
from_stream_type(iterator_type& beg,
iterator_type const& end,
char)
{
std::ostringstream ss;
while(beg != end) {
ss << *beg++;
}
return parse_date<date_type>(ss.str());
}
//! Helper function for 'date gregorian::from_stream()'
/*! Returns the first string found in the stream referenced by the
* begining & end iterators */
template<class date_type, class iterator_type>
inline
date_type
from_stream_type(iterator_type& beg,
iterator_type const& /* end */,
std::string const&)
{
return parse_date<date_type>(*beg);
}
/* I believe the wchar stuff would be best elsewhere, perhaps in
* parse_date<>()? In the mean time this gets us started... */
//! Helper function for 'date gregorian::from_stream()'
/*! Creates a string from the iterators that reference the
* begining & end of a wstring. All elements are
* used in output string */
template<class date_type, class iterator_type>
inline
date_type from_stream_type(iterator_type& beg,
iterator_type const& end,
wchar_t)
{
std::ostringstream ss;
#if !defined(BOOST_DATE_TIME_NO_LOCALE)
std::locale loc;
std::ctype<wchar_t> const& fac = std::use_facet<std::ctype<wchar_t> >(loc);
while(beg != end) {
ss << fac.narrow(*beg++, 'X'); // 'X' will cause exception to be thrown
}
#else
while(beg != end) {
char c = 'X'; // 'X' will cause exception to be thrown
const wchar_t wc = *beg++;
if (wc >= 0 && wc <= 127)
c = static_cast< char >(wc);
ss << c;
}
#endif
return parse_date<date_type>(ss.str());
}
#ifndef BOOST_NO_STD_WSTRING
//! Helper function for 'date gregorian::from_stream()'
/*! Creates a string from the first wstring found in the stream
* referenced by the begining & end iterators */
template<class date_type, class iterator_type>
inline
date_type
from_stream_type(iterator_type& beg,
iterator_type const& /* end */,
std::wstring const&) {
std::wstring ws = *beg;
std::ostringstream ss;
std::wstring::iterator wsb = ws.begin(), wse = ws.end();
#if !defined(BOOST_DATE_TIME_NO_LOCALE)
std::locale loc;
std::ctype<wchar_t> const& fac = std::use_facet<std::ctype<wchar_t> >(loc);
while(wsb != wse) {
ss << fac.narrow(*wsb++, 'X'); // 'X' will cause exception to be thrown
}
#else
while(wsb != wse) {
char c = 'X'; // 'X' will cause exception to be thrown
const wchar_t wc = *wsb++;
if (wc >= 0 && wc <= 127)
c = static_cast< char >(wc);
ss << c;
}
#endif
return parse_date<date_type>(ss.str());
}
#endif // BOOST_NO_STD_WSTRING
#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
// This function cannot be compiled with MSVC 6.0 due to internal compiler shorcomings
#else
//! function called by wrapper functions: date_period_from_(w)string()
template<class date_type, class charT>
period<date_type, typename date_type::duration_type>
from_simple_string_type(const std::basic_string<charT>& s){
typedef typename std::basic_string<charT>::traits_type traits_type;
typedef typename boost::char_separator<charT, traits_type> char_separator;
typedef typename boost::tokenizer<char_separator,
typename std::basic_string<charT>::const_iterator,
std::basic_string<charT> > tokenizer;
const charT sep_list[4] = {'[','/',']','\0'};
char_separator sep(sep_list);
tokenizer tokens(s, sep);
typename tokenizer::iterator tok_it = tokens.begin();
std::basic_string<charT> date_string = *tok_it;
// get 2 string iterators and generate a date from them
typename std::basic_string<charT>::iterator date_string_start = date_string.begin(),
date_string_end = date_string.end();
typedef typename std::iterator_traits<typename std::basic_string<charT>::iterator>::value_type value_type;
date_type d1 = from_stream_type<date_type>(date_string_start, date_string_end, value_type());
date_string = *(++tok_it); // next token
date_string_start = date_string.begin(), date_string_end = date_string.end();
date_type d2 = from_stream_type<date_type>(date_string_start, date_string_end, value_type());
return period<date_type, typename date_type::duration_type>(d1, d2);
}
#endif
} } //namespace date_time
#endif

View File

@@ -0,0 +1,391 @@
#ifndef DATE_TIME_DST_RULES_HPP__
#define DATE_TIME_DST_RULES_HPP__
/* Copyright (c) 2002,2003, 2007 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
/*! @file dst_rules.hpp
Contains template class to provide static dst rule calculations
*/
#include "boost/date_time/date_generators.hpp"
#include "boost/date_time/period.hpp"
#include "boost/date_time/date_defs.hpp"
#include <stdexcept>
namespace boost {
namespace date_time {
enum time_is_dst_result {is_not_in_dst, is_in_dst,
ambiguous, invalid_time_label};
//! Dynamic class used to caluclate dst transition information
template<class date_type_,
class time_duration_type_>
class dst_calculator
{
public:
typedef time_duration_type_ time_duration_type;
typedef date_type_ date_type;
//! Check the local time offset when on dst start day
/*! On this dst transition, the time label between
* the transition boundary and the boudary + the offset
* are invalid times. If before the boundary then still
* not in dst.
*@param time_of_day Time offset in the day for the local time
*@param dst_start_offset_minutes Local day offset for start of dst
*@param dst_length_minutes Number of minutes to adjust clock forward
*@retval status of time label w.r.t. dst
*/
static time_is_dst_result
process_local_dst_start_day(const time_duration_type& time_of_day,
unsigned int dst_start_offset_minutes,
long dst_length_minutes)
{
//std::cout << "here" << std::endl;
if (time_of_day < time_duration_type(0,dst_start_offset_minutes,0)) {
return is_not_in_dst;
}
long offset = dst_start_offset_minutes + dst_length_minutes;
if (time_of_day >= time_duration_type(0,offset,0)) {
return is_in_dst;
}
return invalid_time_label;
}
//! Check the local time offset when on the last day of dst
/*! This is the calculation for the DST end day. On that day times
* prior to the conversion time - dst_length (1 am in US) are still
* in dst. Times between the above and the switch time are
* ambiguous. Times after the start_offset are not in dst.
*@param time_of_day Time offset in the day for the local time
*@param dst_end_offset_minutes Local time of day for end of dst
*@retval status of time label w.r.t. dst
*/
static time_is_dst_result
process_local_dst_end_day(const time_duration_type& time_of_day,
unsigned int dst_end_offset_minutes,
long dst_length_minutes)
{
//in US this will be 60 so offset in day is 1,0,0
int offset = dst_end_offset_minutes-dst_length_minutes;
if (time_of_day < time_duration_type(0,offset,0)) {
return is_in_dst;
}
if (time_of_day >= time_duration_type(0,dst_end_offset_minutes,0)) {
return is_not_in_dst;
}
return ambiguous;
}
//! Calculates if the given local time is dst or not
/*! Determines if the time is really in DST or not. Also checks for
* invalid and ambiguous.
* @param current_day The day to check for dst
* @param time_of_day Time offset within the day to check
* @param dst_start_day Starting day of dst for the given locality
* @param dst_start_offset Time offset within day for dst boundary
* @param dst_end_day Ending day of dst for the given locality
* @param dst_end_offset Time offset within day given in dst for dst boundary
* @param dst_length_minutes length of dst adjusment
* @retval The time is either ambiguous, invalid, in dst, or not in dst
*/
static time_is_dst_result
local_is_dst(const date_type& current_day,
const time_duration_type& time_of_day,
const date_type& dst_start_day,
const time_duration_type& dst_start_offset,
const date_type& dst_end_day,
const time_duration_type& dst_end_offset,
const time_duration_type& dst_length)
{
unsigned int start_minutes = static_cast<unsigned>(
dst_start_offset.hours() * 60 + dst_start_offset.minutes());
unsigned int end_minutes = static_cast<unsigned>(
dst_end_offset.hours() * 60 + dst_end_offset.minutes());
long length_minutes = static_cast<long>(
dst_length.hours() * 60 + dst_length.minutes());
return local_is_dst(current_day, time_of_day,
dst_start_day, start_minutes,
dst_end_day, end_minutes,
length_minutes);
}
//! Calculates if the given local time is dst or not
/*! Determines if the time is really in DST or not. Also checks for
* invalid and ambiguous.
* @param current_day The day to check for dst
* @param time_of_day Time offset within the day to check
* @param dst_start_day Starting day of dst for the given locality
* @param dst_start_offset_minutes Offset within day for dst
* boundary (eg 120 for US which is 02:00:00)
* @param dst_end_day Ending day of dst for the given locality
* @param dst_end_offset_minutes Offset within day given in dst for dst
* boundary (eg 120 for US which is 02:00:00)
* @param dst_length_minutes Length of dst adjusment (eg: 60 for US)
* @retval The time is either ambiguous, invalid, in dst, or not in dst
*/
static time_is_dst_result
local_is_dst(const date_type& current_day,
const time_duration_type& time_of_day,
const date_type& dst_start_day,
unsigned int dst_start_offset_minutes,
const date_type& dst_end_day,
unsigned int dst_end_offset_minutes,
long dst_length_minutes)
{
//in northern hemisphere dst is in the middle of the year
if (dst_start_day < dst_end_day) {
if ((current_day > dst_start_day) && (current_day < dst_end_day)) {
return is_in_dst;
}
if ((current_day < dst_start_day) || (current_day > dst_end_day)) {
return is_not_in_dst;
}
}
else {//southern hemisphere dst is at begining /end of year
if ((current_day < dst_start_day) && (current_day > dst_end_day)) {
return is_not_in_dst;
}
if ((current_day > dst_start_day) || (current_day < dst_end_day)) {
return is_in_dst;
}
}
if (current_day == dst_start_day) {
return process_local_dst_start_day(time_of_day,
dst_start_offset_minutes,
dst_length_minutes);
}
if (current_day == dst_end_day) {
return process_local_dst_end_day(time_of_day,
dst_end_offset_minutes,
dst_length_minutes);
}
//you should never reach this statement
return invalid_time_label;
}
};
//! Compile-time configurable daylight savings time calculation engine
/* This template provides the ability to configure a daylight savings
* calculation at compile time covering all the cases. Unfortunately
* because of the number of dimensions related to daylight savings
* calculation the number of parameters is high. In addition, the
* start and end transition rules are complex types that specify
* an algorithm for calculation of the starting day and ending
* day of daylight savings time including the month and day
* specifications (eg: last sunday in October).
*
* @param date_type A type that represents dates, typically gregorian::date
* @param time_duration_type Used for the offset in the day calculations
* @param dst_traits A set of traits that define the rules of dst
* calculation. The dst_trait must include the following:
* start_rule_functor - Rule to calculate the starting date of a
* dst transition (eg: last_kday_of_month).
* start_day - static function that returns month of dst start for
* start_rule_functor
* start_month -static function that returns day or day of week for
* dst start of dst
* end_rule_functor - Rule to calculate the end of dst day.
* end_day - static fucntion that returns end day for end_rule_functor
* end_month - static function that returns end month for end_rule_functor
* dst_start_offset_minutes - number of minutes from start of day to transition to dst -- 120 (or 2:00 am) is typical for the U.S. and E.U.
* dst_start_offset_minutes - number of minutes from start of day to transition off of dst -- 180 (or 3:00 am) is typical for E.U.
* dst_length_minutes - number of minutes that dst shifts clock
*/
template<class date_type,
class time_duration_type,
class dst_traits>
class dst_calc_engine
{
public:
typedef typename date_type::year_type year_type;
typedef typename date_type::calendar_type calendar_type;
typedef dst_calculator<date_type, time_duration_type> dstcalc;
//! Calculates if the given local time is dst or not
/*! Determines if the time is really in DST or not. Also checks for
* invalid and ambiguous.
* @retval The time is either ambiguous, invalid, in dst, or not in dst
*/
static time_is_dst_result local_is_dst(const date_type& d,
const time_duration_type& td)
{
year_type y = d.year();
date_type dst_start = local_dst_start_day(y);
date_type dst_end = local_dst_end_day(y);
return dstcalc::local_is_dst(d,td,
dst_start,
dst_traits::dst_start_offset_minutes(),
dst_end,
dst_traits::dst_end_offset_minutes(),
dst_traits::dst_shift_length_minutes());
}
static bool is_dst_boundary_day(date_type d)
{
year_type y = d.year();
return ((d == local_dst_start_day(y)) ||
(d == local_dst_end_day(y)));
}
//! The time of day for the dst transition (eg: typically 01:00:00 or 02:00:00)
static time_duration_type dst_offset()
{
return time_duration_type(0,dst_traits::dst_shift_length_minutes(),0);
}
static date_type local_dst_start_day(year_type year)
{
return dst_traits::local_dst_start_day(year);
}
static date_type local_dst_end_day(year_type year)
{
return dst_traits::local_dst_end_day(year);
}
};
//! Depricated: Class to calculate dst boundaries for US time zones
/* Use dst_calc_engine instead.
* In 2007 US/Canada DST rules changed
* (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_saving_time).
*/
template<class date_type_,
class time_duration_type_,
unsigned int dst_start_offset_minutes=120, //from start of day
short dst_length_minutes=60> //1 hour == 60 min in US
class us_dst_rules
{
public:
typedef time_duration_type_ time_duration_type;
typedef date_type_ date_type;
typedef typename date_type::year_type year_type;
typedef typename date_type::calendar_type calendar_type;
typedef date_time::last_kday_of_month<date_type> lkday;
typedef date_time::first_kday_of_month<date_type> fkday;
typedef date_time::nth_kday_of_month<date_type> nkday;
typedef dst_calculator<date_type, time_duration_type> dstcalc;
//! Calculates if the given local time is dst or not
/*! Determines if the time is really in DST or not. Also checks for
* invalid and ambiguous.
* @retval The time is either ambiguous, invalid, in dst, or not in dst
*/
static time_is_dst_result local_is_dst(const date_type& d,
const time_duration_type& td)
{
year_type y = d.year();
date_type dst_start = local_dst_start_day(y);
date_type dst_end = local_dst_end_day(y);
return dstcalc::local_is_dst(d,td,
dst_start,dst_start_offset_minutes,
dst_end, dst_start_offset_minutes,
dst_length_minutes);
}
static bool is_dst_boundary_day(date_type d)
{
year_type y = d.year();
return ((d == local_dst_start_day(y)) ||
(d == local_dst_end_day(y)));
}
static date_type local_dst_start_day(year_type year)
{
if (year >= year_type(2007)) {
//second sunday in march
nkday ssim(nkday::second, Sunday, date_time::Mar);
return ssim.get_date(year);
} else {
//first sunday in april
fkday fsia(Sunday, date_time::Apr);
return fsia.get_date(year);
}
}
static date_type local_dst_end_day(year_type year)
{
if (year >= year_type(2007)) {
//first sunday in november
fkday fsin(Sunday, date_time::Nov);
return fsin.get_date(year);
} else {
//last sunday in october
lkday lsio(Sunday, date_time::Oct);
return lsio.get_date(year);
}
}
static time_duration_type dst_offset()
{
return time_duration_type(0,dst_length_minutes,0);
}
private:
};
//! Used for local time adjustments in places that don't use dst
template<class date_type_, class time_duration_type_>
class null_dst_rules
{
public:
typedef time_duration_type_ time_duration_type;
typedef date_type_ date_type;
//! Calculates if the given local time is dst or not
/*! @retval Always is_not_in_dst since this is for zones without dst
*/
static time_is_dst_result local_is_dst(const date_type&,
const time_duration_type&)
{
return is_not_in_dst;
}
//! Calculates if the given utc time is in dst
static time_is_dst_result utc_is_dst(const date_type&,
const time_duration_type&)
{
return is_not_in_dst;
}
static bool is_dst_boundary_day(date_type /*d*/)
{
return false;
}
static time_duration_type dst_offset()
{
return time_duration_type(0,0,0);
}
};
} } //namespace date_time
#endif

View File

@@ -0,0 +1,75 @@
/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
*/
#ifndef DATE_TIME_DATE_DST_TRANSITION_DAY_GEN_HPP__
#define DATE_TIME_DATE_DST_TRANSITION_DAY_GEN_HPP__
#include <string>
namespace boost {
namespace date_time {
//! Defines base interface for calculating start and end date of daylight savings
template<class date_type>
class dst_day_calc_rule
{
public:
typedef typename date_type::year_type year_type;
virtual ~dst_day_calc_rule() {}
virtual date_type start_day(year_type y) const=0;
virtual std::string start_rule_as_string() const=0;
virtual date_type end_day(year_type y) const=0;
virtual std::string end_rule_as_string() const=0;
};
//! Canonical form for a class that provides day rule calculation
/*! This class is used to generate specific sets of dst rules
*
*@tparam spec Provides a specifiction of the function object types used
* to generate start and end days of daylight savings as well
* as the date type.
*/
template<class spec>
class day_calc_dst_rule : public dst_day_calc_rule<typename spec::date_type>
{
public:
typedef typename spec::date_type date_type;
typedef typename date_type::year_type year_type;
typedef typename spec::start_rule start_rule;
typedef typename spec::end_rule end_rule;
day_calc_dst_rule(start_rule dst_start,
end_rule dst_end) :
dst_start_(dst_start),
dst_end_(dst_end)
{}
virtual date_type start_day(year_type y) const
{
return dst_start_.get_date(y);
}
virtual std::string start_rule_as_string() const
{
return dst_start_.to_string();
}
virtual date_type end_day(year_type y) const
{
return dst_end_.get_date(y);
}
virtual std::string end_rule_as_string() const
{
return dst_end_.to_string();
}
private:
start_rule dst_start_;
end_rule dst_end_;
};
} }//namespace
#endif

View File

@@ -0,0 +1,84 @@
#ifndef DATE_TIME_FILETIME_FUNCTIONS_HPP__
#define DATE_TIME_FILETIME_FUNCTIONS_HPP__
/* Copyright (c) 2004 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
/*! @file filetime_functions.hpp
* Function(s) for converting between a FILETIME structure and a
* time object. This file is only available on systems that have
* BOOST_HAS_FTIME defined.
*/
#include <boost/date_time/compiler_config.hpp>
#if defined(BOOST_HAS_FTIME) // skip this file if no FILETIME
#include <boost/cstdint.hpp>
#include <boost/date_time/time.hpp>
#include <boost/date_time/date_defs.hpp>
namespace boost {
namespace date_time {
//! Create a time object from an initialized FILETIME struct.
/*!
* Create a time object from an initialized FILETIME struct.
* A FILETIME struct holds 100-nanosecond units (0.0000001). When
* built with microsecond resolution the file_time's sub second value
* will be truncated. Nanosecond resolution has no truncation.
*
* \note The function is templated on the FILETIME type, so that
* it can be used with both native FILETIME and the ad-hoc
* boost::detail::winapi::FILETIME_ type.
*/
template< typename TimeT, typename FileTimeT >
inline
TimeT time_from_ftime(const FileTimeT& ft)
{
typedef typename TimeT::date_type date_type;
typedef typename TimeT::date_duration_type date_duration_type;
typedef typename TimeT::time_duration_type time_duration_type;
// https://svn.boost.org/trac/boost/ticket/2523
// Since this function can be called with arbitrary times, including ones that
// are before 1970-Jan-01, we'll have to cast the time a bit differently,
// than it is done in the microsec_clock::file_time_to_microseconds function. This allows to
// avoid integer wrapping for dates before 1970-Jan-01.
// 100-nanos since 1601-Jan-01
uint64_t ft_as_integer = (static_cast< uint64_t >(ft.dwHighDateTime) << 32) | static_cast< uint64_t >(ft.dwLowDateTime);
uint64_t sec = ft_as_integer / 10000000UL;
uint32_t sub_sec = static_cast< uint32_t >(ft_as_integer % 10000000UL) // 100-nanoseconds since the last second
#if !defined(BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG)
/ 10U; // microseconds since the last second
#else
* 100U; // nanoseconds since the last second
#endif
// split sec into usable chunks: days, hours, minutes, & seconds
const uint32_t sec_per_day = 86400; // seconds per day
uint32_t days = static_cast< uint32_t >(sec / sec_per_day);
uint32_t tmp = static_cast< uint32_t >(sec % sec_per_day);
uint32_t hours = tmp / 3600; // sec_per_hour
tmp %= 3600;
uint32_t minutes = tmp / 60; // sec_per_min
tmp %= 60;
uint32_t seconds = tmp; // seconds
date_duration_type dd(days);
date_type d = date_type(1601, Jan, 01) + dd;
return TimeT(d, time_duration_type(hours, minutes, seconds, sub_sec));
}
}} // boost::date_time
#endif // BOOST_HAS_FTIME
#endif // DATE_TIME_FILETIME_FUNCTIONS_HPP__

View File

@@ -0,0 +1,42 @@
#ifndef _BOOST_DATE_TIME_FIND_MATCH_HPP___
#define _BOOST_DATE_TIME_FIND_MATCH_HPP___
/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <string>
namespace boost {
namespace date_time {
//! Find index of a string in either of 2 arrays
/*! find_match searches both arrays for a match to 's'. Both arrays
* must contain 'size' elements. The index of the match is returned.
* If no match is found, 'size' is returned.
* Ex. "Jan" returns 0, "Dec" returns 11, "Tue" returns 2.
* 'size' can be sent in with: (greg_month::max)() (which 12),
* (greg_weekday::max)() + 1 (which is 7) or date_time::NumSpecialValues */
template<class charT>
short find_match(const charT* const* short_names,
const charT* const* long_names,
short size,
const std::basic_string<charT>& s) {
for(short i = 0; i < size; ++i){
if(short_names[i] == s || long_names[i] == s){
return i;
}
}
return size; // not-found, return a value out of range
}
} } //namespace date_time
#endif

View File

@@ -0,0 +1,724 @@
#ifndef DATE_TIME_FORMAT_DATE_PARSER_HPP__
#define DATE_TIME_FORMAT_DATE_PARSER_HPP__
/* Copyright (c) 2004-2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/lexical_cast.hpp"
#include "boost/date_time/string_parse_tree.hpp"
#include "boost/date_time/strings_from_facet.hpp"
#include "boost/date_time/special_values_parser.hpp"
#include <string>
#include <vector>
#include <sstream>
#include <iterator>
#ifndef BOOST_NO_STDC_NAMESPACE
# include <cctype>
#else
# include <ctype.h>
#endif
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std {
using ::isspace;
using ::isdigit;
}
#endif
namespace boost { namespace date_time {
//! Helper function for parsing fixed length strings into integers
/*! Will consume 'length' number of characters from stream. Consumed
* character are transfered to parse_match_result struct.
* Returns '-1' if no number can be parsed or incorrect number of
* digits in stream. */
template<typename int_type, typename charT>
inline
int_type
fixed_string_to_int(std::istreambuf_iterator<charT>& itr,
std::istreambuf_iterator<charT>& stream_end,
parse_match_result<charT>& mr,
unsigned int length,
const charT& fill_char)
{
//typedef std::basic_string<charT> string_type;
unsigned int j = 0;
//string_type s;
while (j < length && itr != stream_end &&
(std::isdigit(*itr) || *itr == fill_char)) {
if(*itr == fill_char) {
/* Since a fill_char can be anything, we convert it to a zero.
* lexical_cast will behave predictably when zero is used as fill. */
mr.cache += ('0');
}
else {
mr.cache += (*itr);
}
itr++;
j++;
}
int_type i = static_cast<int_type>(-1);
// mr.cache will hold leading zeros. size() tells us when input is too short.
if(mr.cache.size() < length) {
return i;
}
try {
i = boost::lexical_cast<int_type>(mr.cache);
}catch(bad_lexical_cast&){
// we want to return -1 if the cast fails so nothing to do here
}
return i;
}
//! Helper function for parsing fixed length strings into integers
/*! Will consume 'length' number of characters from stream. Consumed
* character are transfered to parse_match_result struct.
* Returns '-1' if no number can be parsed or incorrect number of
* digits in stream. */
template<typename int_type, typename charT>
inline
int_type
fixed_string_to_int(std::istreambuf_iterator<charT>& itr,
std::istreambuf_iterator<charT>& stream_end,
parse_match_result<charT>& mr,
unsigned int length)
{
return fixed_string_to_int<int_type, charT>(itr, stream_end, mr, length, '0');
}
//! Helper function for parsing varied length strings into integers
/*! Will consume 'max_length' characters from stream only if those
* characters are digits. Returns '-1' if no number can be parsed.
* Will not parse a number preceeded by a '+' or '-'. */
template<typename int_type, typename charT>
inline
int_type
var_string_to_int(std::istreambuf_iterator<charT>& itr,
const std::istreambuf_iterator<charT>& stream_end,
unsigned int max_length)
{
typedef std::basic_string<charT> string_type;
unsigned int j = 0;
string_type s;
while (itr != stream_end && (j < max_length) && std::isdigit(*itr)) {
s += (*itr);
++itr;
++j;
}
int_type i = static_cast<int_type>(-1);
if(!s.empty()) {
i = boost::lexical_cast<int_type>(s);
}
return i;
}
//! Class with generic date parsing using a format string
/*! The following is the set of recognized format specifiers
- %a - Short weekday name
- %A - Long weekday name
- %b - Abbreviated month name
- %B - Full month name
- %d - Day of the month as decimal 01 to 31
- %j - Day of year as decimal from 001 to 366
- %m - Month name as a decimal 01 to 12
- %U - Week number 00 to 53 with first Sunday as the first day of week 1?
- %w - Weekday as decimal number 0 to 6 where Sunday == 0
- %W - Week number 00 to 53 where Monday is first day of week 1
- %x - facet default date representation
- %y - Year without the century - eg: 04 for 2004
- %Y - Year with century
The weekday specifiers (%a and %A) do not add to the date construction,
but they provide a way to skip over the weekday names for formats that
provide them.
todo -- Another interesting feature that this approach could provide is
an option to fill in any missing fields with the current values
from the clock. So if you have %m-%d the parser would detect
the missing year value and fill it in using the clock.
todo -- What to do with the %x. %x in the classic facet is just bad...
*/
template<class date_type, typename charT>
class format_date_parser
{
public:
typedef std::basic_string<charT> string_type;
typedef std::basic_istringstream<charT> stringstream_type;
typedef std::istreambuf_iterator<charT> stream_itr_type;
typedef typename string_type::const_iterator const_itr;
typedef typename date_type::year_type year_type;
typedef typename date_type::month_type month_type;
typedef typename date_type::day_type day_type;
typedef typename date_type::duration_type duration_type;
typedef typename date_type::day_of_week_type day_of_week_type;
typedef typename date_type::day_of_year_type day_of_year_type;
typedef string_parse_tree<charT> parse_tree_type;
typedef typename parse_tree_type::parse_match_result_type match_results;
typedef std::vector<std::basic_string<charT> > input_collection_type;
// TODO sv_parser uses its default constructor - write the others
format_date_parser(const string_type& format_str,
const input_collection_type& month_short_names,
const input_collection_type& month_long_names,
const input_collection_type& weekday_short_names,
const input_collection_type& weekday_long_names) :
m_format(format_str),
m_month_short_names(month_short_names, 1),
m_month_long_names(month_long_names, 1),
m_weekday_short_names(weekday_short_names),
m_weekday_long_names(weekday_long_names)
{}
format_date_parser(const string_type& format_str,
const std::locale& locale) :
m_format(format_str),
m_month_short_names(gather_month_strings<charT>(locale), 1),
m_month_long_names(gather_month_strings<charT>(locale, false), 1),
m_weekday_short_names(gather_weekday_strings<charT>(locale)),
m_weekday_long_names(gather_weekday_strings<charT>(locale, false))
{}
format_date_parser(const format_date_parser<date_type,charT>& fdp)
{
this->m_format = fdp.m_format;
this->m_month_short_names = fdp.m_month_short_names;
this->m_month_long_names = fdp.m_month_long_names;
this->m_weekday_short_names = fdp.m_weekday_short_names;
this->m_weekday_long_names = fdp.m_weekday_long_names;
}
string_type format() const
{
return m_format;
}
void format(string_type format_str)
{
m_format = format_str;
}
void short_month_names(const input_collection_type& month_names)
{
m_month_short_names = parse_tree_type(month_names, 1);
}
void long_month_names(const input_collection_type& month_names)
{
m_month_long_names = parse_tree_type(month_names, 1);
}
void short_weekday_names(const input_collection_type& weekday_names)
{
m_weekday_short_names = parse_tree_type(weekday_names);
}
void long_weekday_names(const input_collection_type& weekday_names)
{
m_weekday_long_names = parse_tree_type(weekday_names);
}
date_type
parse_date(const string_type& value,
const string_type& format_str,
const special_values_parser<date_type,charT>& sv_parser) const
{
stringstream_type ss(value);
stream_itr_type sitr(ss);
stream_itr_type stream_end;
return parse_date(sitr, stream_end, format_str, sv_parser);
}
date_type
parse_date(std::istreambuf_iterator<charT>& sitr,
std::istreambuf_iterator<charT>& stream_end,
const special_values_parser<date_type,charT>& sv_parser) const
{
return parse_date(sitr, stream_end, m_format, sv_parser);
}
/*! Of all the objects that the format_date_parser can parse, only a
* date can be a special value. Therefore, only parse_date checks
* for special_values. */
date_type
parse_date(std::istreambuf_iterator<charT>& sitr,
std::istreambuf_iterator<charT>& stream_end,
string_type format_str,
const special_values_parser<date_type,charT>& sv_parser) const
{
bool use_current_char = false;
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
short year(0), month(0), day(0), day_of_year(0);// wkday(0);
/* Initialized the following to their minimum values. These intermediate
* objects are used so we get specific exceptions when part of the input
* is unparsable.
* Ex: "205-Jan-15" will throw a bad_year, "2005-Jsn-15"- bad_month, etc.*/
year_type t_year(1400);
month_type t_month(1);
day_type t_day(1);
day_of_week_type wkday(0);
const_itr itr(format_str.begin());
while (itr != format_str.end() && (sitr != stream_end)) {
if (*itr == '%') {
if ( ++itr == format_str.end())
break;
if (*itr != '%') {
switch(*itr) {
case 'a':
{
//this value is just throw away. It could be used for
//error checking potentially, but it isn't helpful in
//actually constructing the date - we just need to get it
//out of the stream
match_results mr = m_weekday_short_names.match(sitr, stream_end);
if(mr.current_match == match_results::PARSE_ERROR) {
// check special_values
if(sv_parser.match(sitr, stream_end, mr)) {
return date_type(static_cast<special_values>(mr.current_match));
}
}
wkday = mr.current_match;
if (mr.has_remaining()) {
use_current_char = true;
}
break;
}
case 'A':
{
//this value is just throw away. It could be used for
//error checking potentially, but it isn't helpful in
//actually constructing the date - we just need to get it
//out of the stream
match_results mr = m_weekday_long_names.match(sitr, stream_end);
if(mr.current_match == match_results::PARSE_ERROR) {
// check special_values
if(sv_parser.match(sitr, stream_end, mr)) {
return date_type(static_cast<special_values>(mr.current_match));
}
}
wkday = mr.current_match;
if (mr.has_remaining()) {
use_current_char = true;
}
break;
}
case 'b':
{
match_results mr = m_month_short_names.match(sitr, stream_end);
if(mr.current_match == match_results::PARSE_ERROR) {
// check special_values
if(sv_parser.match(sitr, stream_end, mr)) {
return date_type(static_cast<special_values>(mr.current_match));
}
}
t_month = month_type(mr.current_match);
if (mr.has_remaining()) {
use_current_char = true;
}
break;
}
case 'B':
{
match_results mr = m_month_long_names.match(sitr, stream_end);
if(mr.current_match == match_results::PARSE_ERROR) {
// check special_values
if(sv_parser.match(sitr, stream_end, mr)) {
return date_type(static_cast<special_values>(mr.current_match));
}
}
t_month = month_type(mr.current_match);
if (mr.has_remaining()) {
use_current_char = true;
}
break;
}
case 'd':
{
match_results mr;
day = fixed_string_to_int<short, charT>(sitr, stream_end, mr, 2);
if(day == -1) {
if(sv_parser.match(sitr, stream_end, mr)) {
return date_type(static_cast<special_values>(mr.current_match));
}
}
t_day = day_type(day);
break;
}
case 'e':
{
match_results mr;
day = fixed_string_to_int<short, charT>(sitr, stream_end, mr, 2, ' ');
if(day == -1) {
if(sv_parser.match(sitr, stream_end, mr)) {
return date_type(static_cast<special_values>(mr.current_match));
}
}
t_day = day_type(day);
break;
}
case 'j':
{
match_results mr;
day_of_year = fixed_string_to_int<short, charT>(sitr, stream_end, mr, 3);
if(day_of_year == -1) {
if(sv_parser.match(sitr, stream_end, mr)) {
return date_type(static_cast<special_values>(mr.current_match));
}
}
// these next two lines are so we get an exception with bad input
day_of_year_type t_day_of_year(1);
t_day_of_year = day_of_year_type(day_of_year);
break;
}
case 'm':
{
match_results mr;
month = fixed_string_to_int<short, charT>(sitr, stream_end, mr, 2);
if(month == -1) {
if(sv_parser.match(sitr, stream_end, mr)) {
return date_type(static_cast<special_values>(mr.current_match));
}
}
t_month = month_type(month);
break;
}
case 'Y':
{
match_results mr;
year = fixed_string_to_int<short, charT>(sitr, stream_end, mr, 4);
if(year == -1) {
if(sv_parser.match(sitr, stream_end, mr)) {
return date_type(static_cast<special_values>(mr.current_match));
}
}
t_year = year_type(year);
break;
}
case 'y':
{
match_results mr;
year = fixed_string_to_int<short, charT>(sitr, stream_end, mr, 2);
if(year == -1) {
if(sv_parser.match(sitr, stream_end, mr)) {
return date_type(static_cast<special_values>(mr.current_match));
}
}
year += 2000; //make 2 digit years in this century
t_year = year_type(year);
break;
}
default:
{} //ignore those we don't understand
}//switch
}
else { // itr == '%', second consecutive
sitr++;
}
itr++; //advance past format specifier
}
else { //skip past chars in format and in buffer
itr++;
if (use_current_char) {
use_current_char = false;
}
else {
sitr++;
}
}
}
if (day_of_year > 0) {
date_type d(static_cast<unsigned short>(year-1),12,31); //end of prior year
return d + duration_type(day_of_year);
}
return date_type(t_year, t_month, t_day); // exceptions were thrown earlier
// if input was no good
}
//! Throws bad_month if unable to parse
month_type
parse_month(std::istreambuf_iterator<charT>& sitr,
std::istreambuf_iterator<charT>& stream_end,
string_type format_str) const
{
match_results mr;
return parse_month(sitr, stream_end, format_str, mr);
}
//! Throws bad_month if unable to parse
month_type
parse_month(std::istreambuf_iterator<charT>& sitr,
std::istreambuf_iterator<charT>& stream_end,
string_type format_str,
match_results& mr) const
{
bool use_current_char = false;
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
short month(0);
const_itr itr(format_str.begin());
while (itr != format_str.end() && (sitr != stream_end)) {
if (*itr == '%') {
if ( ++itr == format_str.end())
break;
if (*itr != '%') {
switch(*itr) {
case 'b':
{
mr = m_month_short_names.match(sitr, stream_end);
month = mr.current_match;
if (mr.has_remaining()) {
use_current_char = true;
}
break;
}
case 'B':
{
mr = m_month_long_names.match(sitr, stream_end);
month = mr.current_match;
if (mr.has_remaining()) {
use_current_char = true;
}
break;
}
case 'm':
{
month = var_string_to_int<short, charT>(sitr, stream_end, 2);
// var_string_to_int returns -1 if parse failed. That will
// cause a bad_month exception to be thrown so we do nothing here
break;
}
default:
{} //ignore those we don't understand
}//switch
}
else { // itr == '%', second consecutive
sitr++;
}
itr++; //advance past format specifier
}
else { //skip past chars in format and in buffer
itr++;
if (use_current_char) {
use_current_char = false;
}
else {
sitr++;
}
}
}
return month_type(month); // throws bad_month exception when values are zero
}
//! Expects 1 or 2 digits 1-31. Throws bad_day_of_month if unable to parse
day_type
parse_var_day_of_month(std::istreambuf_iterator<charT>& sitr,
std::istreambuf_iterator<charT>& stream_end) const
{
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
return day_type(var_string_to_int<short, charT>(sitr, stream_end, 2));
}
//! Expects 2 digits 01-31. Throws bad_day_of_month if unable to parse
day_type
parse_day_of_month(std::istreambuf_iterator<charT>& sitr,
std::istreambuf_iterator<charT>& stream_end) const
{
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
//return day_type(var_string_to_int<short, charT>(sitr, stream_end, 2));
match_results mr;
return day_type(fixed_string_to_int<short, charT>(sitr, stream_end, mr, 2));
}
day_of_week_type
parse_weekday(std::istreambuf_iterator<charT>& sitr,
std::istreambuf_iterator<charT>& stream_end,
string_type format_str) const
{
match_results mr;
return parse_weekday(sitr, stream_end, format_str, mr);
}
day_of_week_type
parse_weekday(std::istreambuf_iterator<charT>& sitr,
std::istreambuf_iterator<charT>& stream_end,
string_type format_str,
match_results& mr) const
{
bool use_current_char = false;
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
short wkday(0);
const_itr itr(format_str.begin());
while (itr != format_str.end() && (sitr != stream_end)) {
if (*itr == '%') {
if ( ++itr == format_str.end())
break;
if (*itr != '%') {
switch(*itr) {
case 'a':
{
//this value is just throw away. It could be used for
//error checking potentially, but it isn't helpful in
//actually constructing the date - we just need to get it
//out of the stream
mr = m_weekday_short_names.match(sitr, stream_end);
wkday = mr.current_match;
if (mr.has_remaining()) {
use_current_char = true;
}
break;
}
case 'A':
{
//this value is just throw away. It could be used for
//error checking potentially, but it isn't helpful in
//actually constructing the date - we just need to get it
//out of the stream
mr = m_weekday_long_names.match(sitr, stream_end);
wkday = mr.current_match;
if (mr.has_remaining()) {
use_current_char = true;
}
break;
}
case 'w':
{
// weekday as number 0-6, Sunday == 0
wkday = var_string_to_int<short, charT>(sitr, stream_end, 2);
break;
}
default:
{} //ignore those we don't understand
}//switch
}
else { // itr == '%', second consecutive
sitr++;
}
itr++; //advance past format specifier
}
else { //skip past chars in format and in buffer
itr++;
if (use_current_char) {
use_current_char = false;
}
else {
sitr++;
}
}
}
return day_of_week_type(wkday); // throws bad_day_of_month exception
// when values are zero
}
//! throws bad_year if unable to parse
year_type
parse_year(std::istreambuf_iterator<charT>& sitr,
std::istreambuf_iterator<charT>& stream_end,
string_type format_str) const
{
match_results mr;
return parse_year(sitr, stream_end, format_str, mr);
}
//! throws bad_year if unable to parse
year_type
parse_year(std::istreambuf_iterator<charT>& sitr,
std::istreambuf_iterator<charT>& stream_end,
string_type format_str,
match_results& mr) const
{
// skip leading whitespace
while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; }
unsigned short year(0);
const_itr itr(format_str.begin());
while (itr != format_str.end() && (sitr != stream_end)) {
if (*itr == '%') {
if ( ++itr == format_str.end())
break;
if (*itr != '%') {
//match_results mr;
switch(*itr) {
case 'Y':
{
// year from 4 digit string
year = fixed_string_to_int<short, charT>(sitr, stream_end, mr, 4);
break;
}
case 'y':
{
// year from 2 digit string (no century)
year = fixed_string_to_int<short, charT>(sitr, stream_end, mr, 2);
year += 2000; //make 2 digit years in this century
break;
}
default:
{} //ignore those we don't understand
}//switch
}
else { // itr == '%', second consecutive
sitr++;
}
itr++; //advance past format specifier
}
else { //skip past chars in format and in buffer
itr++;
sitr++;
}
}
return year_type(year); // throws bad_year exception when values are zero
}
private:
string_type m_format;
parse_tree_type m_month_short_names;
parse_tree_type m_month_long_names;
parse_tree_type m_weekday_short_names;
parse_tree_type m_weekday_long_names;
};
} } //namespace
#endif

View File

@@ -0,0 +1,68 @@
#ifndef _GREGORIAN__CONVERSION_HPP___
#define _GREGORIAN__CONVERSION_HPP___
/* Copyright (c) 2004-2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <cstring>
#include <string>
#include <stdexcept>
#include <boost/throw_exception.hpp>
#include <boost/date_time/c_time.hpp>
#include <boost/date_time/special_defs.hpp>
#include <boost/date_time/gregorian/gregorian_types.hpp>
namespace boost {
namespace gregorian {
//! Converts a date to a tm struct. Throws out_of_range exception if date is a special value
inline
std::tm to_tm(const date& d)
{
if (d.is_special())
{
std::string s = "tm unable to handle ";
switch (d.as_special())
{
case date_time::not_a_date_time:
s += "not-a-date-time value"; break;
case date_time::neg_infin:
s += "-infinity date value"; break;
case date_time::pos_infin:
s += "+infinity date value"; break;
default:
s += "a special date value"; break;
}
boost::throw_exception(std::out_of_range(s));
}
std::tm datetm;
std::memset(&datetm, 0, sizeof(datetm));
boost::gregorian::date::ymd_type ymd = d.year_month_day();
datetm.tm_year = ymd.year - 1900;
datetm.tm_mon = ymd.month - 1;
datetm.tm_mday = ymd.day;
datetm.tm_wday = d.day_of_week();
datetm.tm_yday = d.day_of_year() - 1;
datetm.tm_isdst = -1; // negative because not enough info to set tm_isdst
return datetm;
}
//! Converts a tm structure into a date dropping the any time values.
inline
date date_from_tm(const std::tm& datetm)
{
return date(static_cast<unsigned short>(datetm.tm_year+1900),
static_cast<unsigned short>(datetm.tm_mon+1),
static_cast<unsigned short>(datetm.tm_mday));
}
} } //namespace boost::gregorian
#endif

View File

@@ -0,0 +1,162 @@
#ifndef GREGORIAN_FORMATTERS_HPP___
#define GREGORIAN_FORMATTERS_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/compiler_config.hpp"
#include "boost/date_time/gregorian/gregorian_types.hpp"
#if defined(BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS)
#include "boost/date_time/date_formatting_limited.hpp"
#else
#include "boost/date_time/date_formatting.hpp"
#endif
#include "boost/date_time/iso_format.hpp"
#include "boost/date_time/date_format_simple.hpp"
/* NOTE: "to_*_string" code for older compilers, ones that define
* BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS, is located in
* formatters_limited.hpp
*/
namespace boost {
namespace gregorian {
// wrapper function for to_simple_(w)string(date)
template<class charT>
inline
std::basic_string<charT> to_simple_string_type(const date& d) {
return date_time::date_formatter<date,date_time::simple_format<charT>,charT>::date_to_string(d);
}
//! To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01
/*!\ingroup date_format
*/
inline std::string to_simple_string(const date& d) {
return to_simple_string_type<char>(d);
}
// wrapper function for to_simple_(w)string(date_period)
template<class charT>
inline std::basic_string<charT> to_simple_string_type(const date_period& d) {
typedef std::basic_string<charT> string_type;
charT b = '[', m = '/', e=']';
string_type d1(date_time::date_formatter<date,date_time::simple_format<charT>,charT>::date_to_string(d.begin()));
string_type d2(date_time::date_formatter<date,date_time::simple_format<charT>,charT>::date_to_string(d.last()));
return string_type(b + d1 + m + d2 + e);
}
//! Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02]
/*!\ingroup date_format
*/
inline std::string to_simple_string(const date_period& d) {
return to_simple_string_type<char>(d);
}
// wrapper function for to_iso_(w)string(date_period)
template<class charT>
inline std::basic_string<charT> to_iso_string_type(const date_period& d) {
charT sep = '/';
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
/*!\ingroup date_format
*/
inline std::string to_iso_string(const date_period& d) {
return to_iso_string_type<char>(d);
}
// wrapper function for to_iso_extended_(w)string(date)
template<class charT>
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
/*!\ingroup date_format
*/
inline std::string to_iso_extended_string(const date& d) {
return to_iso_extended_string_type<char>(d);
}
// wrapper function for to_iso_(w)string(date)
template<class charT>
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
/*!\ingroup date_format
*/
inline std::string to_iso_string(const date& d) {
return to_iso_string_type<char>(d);
}
// wrapper function for to_sql_(w)string(date)
template<class charT>
inline std::basic_string<charT> to_sql_string_type(const date& d)
{
date::ymd_type ymd = d.year_month_day();
std::basic_ostringstream<charT> ss;
ss << ymd.year << "-"
<< std::setw(2) << std::setfill(ss.widen('0'))
<< ymd.month.as_number() //solves problem with gcc 3.1 hanging
<< "-"
<< std::setw(2) << std::setfill(ss.widen('0'))
<< ymd.day;
return ss.str();
}
inline std::string to_sql_string(const date& d) {
return to_sql_string_type<char>(d);
}
#if !defined(BOOST_NO_STD_WSTRING)
//! Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02]
/*!\ingroup date_format
*/
inline std::wstring to_simple_wstring(const date_period& d) {
return to_simple_string_type<wchar_t>(d);
}
//! To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01
/*!\ingroup date_format
*/
inline std::wstring to_simple_wstring(const date& d) {
return to_simple_string_type<wchar_t>(d);
}
//! Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231
/*!\ingroup date_format
*/
inline std::wstring to_iso_wstring(const date_period& d) {
return to_iso_string_type<wchar_t>(d);
}
//! Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31
/*!\ingroup date_format
*/
inline std::wstring to_iso_extended_wstring(const date& d) {
return to_iso_extended_string_type<wchar_t>(d);
}
//! Convert to iso standard string YYYYMMDD. Example: 20021231
/*!\ingroup date_format
*/
inline std::wstring to_iso_wstring(const date& d) {
return to_iso_string_type<wchar_t>(d);
}
inline std::wstring to_sql_wstring(const date& d) {
return to_sql_string_type<wchar_t>(d);
}
#endif // BOOST_NO_STD_WSTRING
} } //namespace gregorian
#endif

View File

@@ -0,0 +1,81 @@
#ifndef GREGORIAN_FORMATTERS_LIMITED_HPP___
#define GREGORIAN_FORMATTERS_LIMITED_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/gregorian/gregorian_types.hpp"
#include "boost/date_time/date_formatting_limited.hpp"
#include "boost/date_time/iso_format.hpp"
#include "boost/date_time/date_format_simple.hpp"
#include "boost/date_time/compiler_config.hpp"
namespace boost {
namespace gregorian {
//! To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01
/*!\ingroup date_format
*/
inline std::string to_simple_string(const date& d) {
return date_time::date_formatter<date,date_time::simple_format<char> >::date_to_string(d);
}
//! Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02]
/*!\ingroup date_format
*/
inline std::string to_simple_string(const date_period& d) {
std::string s("[");
std::string d1(date_time::date_formatter<date,date_time::simple_format<char> >::date_to_string(d.begin()));
std::string d2(date_time::date_formatter<date,date_time::simple_format<char> >::date_to_string(d.last()));
return std::string("[" + d1 + "/" + d2 + "]");
}
//! Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231
/*!\ingroup date_format
*/
inline std::string to_iso_string(const date_period& d) {
std::string s(date_time::date_formatter<date,date_time::iso_format<char> >::date_to_string(d.begin()));
return s + "/" + date_time::date_formatter<date,date_time::iso_format<char> >::date_to_string(d.last());
}
//! Convert to iso 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
/*!\ingroup date_format
*/
inline std::string to_iso_string(const date& d) {
return date_time::date_formatter<date,date_time::iso_format<char> >::date_to_string(d);
}
inline std::string to_sql_string(const date& d)
{
date::ymd_type ymd = d.year_month_day();
std::ostringstream ss;
ss << ymd.year << "-"
<< std::setw(2) << std::setfill('0')
<< ymd.month.as_number() //solves problem with gcc 3.1 hanging
<< "-"
<< std::setw(2) << std::setfill('0')
<< ymd.day;
return ss.str();
}
} } //namespace gregorian
#endif

View File

@@ -0,0 +1,49 @@
#ifndef GREGORIAN_GREGORIAN_CALENDAR_HPP__
#define GREGORIAN_GREGORIAN_CALENDAR_HPP__
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland
* $Date$
*/
#include <boost/cstdint.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/gregorian/greg_weekday.hpp>
#include <boost/date_time/gregorian/greg_day_of_year.hpp>
#include <boost/date_time/gregorian_calendar.hpp>
#include <boost/date_time/gregorian/greg_ymd.hpp>
#include <boost/date_time/int_adapter.hpp>
namespace boost {
namespace gregorian {
//!An internal date representation that includes infinities, not a date
typedef date_time::int_adapter<uint32_t> fancy_date_rep;
//! Gregorian calendar for this implementation, hard work in the base
class BOOST_SYMBOL_VISIBLE gregorian_calendar :
public date_time::gregorian_calendar_base<greg_year_month_day, fancy_date_rep::int_type> {
public:
//! Type to hold a weekday (eg: Sunday, Monday,...)
typedef greg_weekday day_of_week_type;
//! Counter type from 1 to 366 for gregorian dates.
typedef greg_day_of_year_rep day_of_year_type;
//! Internal date representation that handles infinity, not a date
typedef fancy_date_rep date_rep_type;
//! Date rep implements the traits stuff as well
typedef fancy_date_rep date_traits_type;
private:
};
} } //namespace gregorian
#endif

View File

@@ -0,0 +1,145 @@
#ifndef GREG_DATE_HPP___
#define GREG_DATE_HPP___
/* Copyright (c) 2002,2003, 2020 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland
* $Date$
*/
#include <boost/throw_exception.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/date.hpp>
#include <boost/date_time/special_defs.hpp>
#include <boost/date_time/gregorian/greg_calendar.hpp>
#include <boost/date_time/gregorian/greg_duration.hpp>
namespace boost {
namespace gregorian {
//bring special enum values into the namespace
using date_time::special_values;
using date_time::not_special;
using date_time::neg_infin;
using date_time::pos_infin;
using date_time::not_a_date_time;
using date_time::max_date_time;
using date_time::min_date_time;
//! A date type based on gregorian_calendar
/*! This class is the primary interface for programming with
greogorian dates. The is a lightweight type that can be
freely passed by value. All comparison operators are
supported.
\ingroup date_basics
*/
class BOOST_SYMBOL_VISIBLE date : public date_time::date<date, gregorian_calendar, date_duration>
{
public:
typedef gregorian_calendar::year_type year_type;
typedef gregorian_calendar::month_type month_type;
typedef gregorian_calendar::day_type day_type;
typedef gregorian_calendar::day_of_year_type day_of_year_type;
typedef gregorian_calendar::ymd_type ymd_type;
typedef gregorian_calendar::date_rep_type date_rep_type;
typedef gregorian_calendar::date_int_type date_int_type;
typedef date_duration duration_type;
#if !defined(DATE_TIME_NO_DEFAULT_CONSTRUCTOR)
//! Default constructor constructs with not_a_date_time
BOOST_CXX14_CONSTEXPR date():
date_time::date<date, gregorian_calendar, date_duration>(date_rep_type::from_special(not_a_date_time))
{}
#endif // DATE_TIME_NO_DEFAULT_CONSTRUCTOR
//! Main constructor with year, month, day
BOOST_CXX14_CONSTEXPR date(year_type y, month_type m, day_type d)
: date_time::date<date, gregorian_calendar, date_duration>(y, m, d)
{
if (gregorian_calendar::end_of_month_day(y, m) < d) {
boost::throw_exception(bad_day_of_month(std::string("Day of month is not valid for year")));
}
}
//! Constructor from a ymd_type structure
BOOST_CXX14_CONSTEXPR explicit date(const ymd_type& ymd)
: date_time::date<date, gregorian_calendar, date_duration>(ymd)
{}
//! Needed copy constructor
BOOST_CXX14_CONSTEXPR explicit date(const date_int_type& rhs):
date_time::date<date,gregorian_calendar, date_duration>(rhs)
{}
//! Needed copy constructor
BOOST_CXX14_CONSTEXPR explicit date(date_rep_type rhs):
date_time::date<date,gregorian_calendar, date_duration>(rhs)
{}
//! 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);
}
}
//!Return the Julian Day number for the date.
BOOST_CXX14_CONSTEXPR date_int_type julian_day() const
{
ymd_type ymd = year_month_day();
return gregorian_calendar::julian_day_number(ymd);
}
//!Return the day of year 1..365 or 1..366 (for leap year)
BOOST_CXX14_CONSTEXPR day_of_year_type day_of_year() const
{
date start_of_year(year(), 1, 1);
unsigned short doy = static_cast<unsigned short>((*this-start_of_year).days() + 1);
return day_of_year_type(doy);
}
//!Return the Modified Julian Day number for the date.
BOOST_CXX14_CONSTEXPR date_int_type modjulian_day() const
{
ymd_type ymd = year_month_day();
return gregorian_calendar::modjulian_day_number(ymd);
}
//!Return the iso 8601 week number 1..53
BOOST_CXX14_CONSTEXPR int week_number() const
{
ymd_type ymd = year_month_day();
return gregorian_calendar::week_number(ymd);
}
//! Return the day number from the calendar
BOOST_CXX14_CONSTEXPR date_int_type day_number() const
{
return days_;
}
//! Return the last day of the current month
BOOST_CXX14_CONSTEXPR date end_of_month() const
{
ymd_type ymd = year_month_day();
unsigned short eom_day = gregorian_calendar::end_of_month_day(ymd.year, ymd.month);
return date(ymd.year, ymd.month, eom_day);
}
friend BOOST_CXX14_CONSTEXPR
bool operator==(const date& lhs, const date& rhs);
private:
};
inline BOOST_CXX14_CONSTEXPR
bool operator==(const date& lhs, const date& rhs)
{
return lhs.days_ == rhs.days_;
}
} } //namespace gregorian
#endif

View File

@@ -0,0 +1,58 @@
#ifndef GREG_DAY_HPP___
#define GREG_DAY_HPP___
/* Copyright (c) 2002,2003,2020 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland
* $Date$
*/
#include <boost/date_time/constrained_value.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <stdexcept>
#include <string>
namespace boost {
namespace gregorian {
//! Exception type for gregorian day of month (1..31)
struct BOOST_SYMBOL_VISIBLE bad_day_of_month : public std::out_of_range
{
bad_day_of_month() :
std::out_of_range(std::string("Day of month value is out of range 1..31"))
{}
//! Allow other classes to throw with unique string for bad day like Feb 29
bad_day_of_month(const std::string& s) :
std::out_of_range(s)
{}
};
//! Policy class that declares error handling and day of month ranges
typedef CV::simple_exception_policy<unsigned short, 1, 31, bad_day_of_month> greg_day_policies;
//! Generated represetation for gregorian day of month
typedef CV::constrained_value<greg_day_policies> greg_day_rep;
//! Represent a day of the month (range 1 - 31)
/*! This small class allows for simple conversion an integer value into
a day of the month for a standard gregorian calendar. The type
is automatically range checked so values outside of the range 1-31
will cause a bad_day_of_month exception
*/
class BOOST_SYMBOL_VISIBLE greg_day : public greg_day_rep {
public:
BOOST_CXX14_CONSTEXPR greg_day(value_type day_of_month) : greg_day_rep(day_of_month) {}
BOOST_CXX14_CONSTEXPR value_type as_number() const {return value_;}
BOOST_CXX14_CONSTEXPR operator value_type() const {return value_;}
private:
};
} } //namespace gregorian
#endif

View File

@@ -0,0 +1,39 @@
#ifndef GREG_DAY_OF_YEAR_HPP___
#define GREG_DAY_OF_YEAR_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland
* $Date$
*/
#include <boost/date_time/constrained_value.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <stdexcept>
#include <string>
namespace boost {
namespace gregorian {
//! Exception type for day of year (1..366)
struct BOOST_SYMBOL_VISIBLE bad_day_of_year : public std::out_of_range
{
bad_day_of_year() :
std::out_of_range(std::string("Day of year value is out of range 1..366"))
{}
};
//! A day of the year range (1..366)
typedef CV::simple_exception_policy<unsigned short,1,366,bad_day_of_year> greg_day_of_year_policies;
//! Define a range representation type for the day of the year 1..366
typedef CV::constrained_value<greg_day_of_year_policies> greg_day_of_year_rep;
} } //namespace gregorian
#endif

View File

@@ -0,0 +1,147 @@
#ifndef GREG_DURATION_HPP___
#define GREG_DURATION_HPP___
/* Copyright (c) 2002,2003, 2020 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/date_duration.hpp>
#include <boost/date_time/int_adapter.hpp>
#include <boost/date_time/special_defs.hpp>
namespace boost {
namespace gregorian {
//!An internal date representation that includes infinities, not a date
typedef boost::date_time::duration_traits_adapted date_duration_rep;
//! Durations in days for gregorian system
/*! \ingroup date_basics
*/
class BOOST_SYMBOL_VISIBLE date_duration :
public boost::date_time::date_duration< date_duration_rep >
{
typedef boost::date_time::date_duration< date_duration_rep > base_type;
public:
typedef base_type::duration_rep duration_rep;
//! Construct from a day count
BOOST_CXX14_CONSTEXPR explicit
date_duration(duration_rep day_count = 0) : base_type(day_count) {}
//! construct from special_values
BOOST_CXX14_CONSTEXPR
date_duration(date_time::special_values sv) : base_type(sv) {}
//! Construct from another date_duration
BOOST_CXX14_CONSTEXPR
date_duration(const base_type& other) : base_type(other)
{}
// Relational operators
// NOTE: Because of date_time::date_duration< T > design choice we don't use Boost.Operators here,
// because we need the class to be a direct base. Either lose EBO, or define operators by hand.
// The latter is more effecient.
BOOST_CXX14_CONSTEXPR bool operator== (const date_duration& rhs) const
{
return base_type::operator== (rhs);
}
BOOST_CXX14_CONSTEXPR bool operator!= (const date_duration& rhs) const
{
return !operator== (rhs);
}
BOOST_CXX14_CONSTEXPR bool operator< (const date_duration& rhs) const
{
return base_type::operator< (rhs);
}
BOOST_CXX14_CONSTEXPR bool operator> (const date_duration& rhs) const
{
return !(base_type::operator< (rhs) || base_type::operator== (rhs));
}
BOOST_CXX14_CONSTEXPR bool operator<= (const date_duration& rhs) const
{
return (base_type::operator< (rhs) || base_type::operator== (rhs));
}
BOOST_CXX14_CONSTEXPR bool operator>= (const date_duration& rhs) const
{
return !base_type::operator< (rhs);
}
//! Subtract another duration -- result is signed
BOOST_CXX14_CONSTEXPR date_duration& operator-= (const date_duration& rhs)
{
base_type::operator-= (rhs);
return *this;
}
BOOST_CXX14_CONSTEXPR friend
date_duration operator- (date_duration rhs, date_duration const& lhs);
//! Add a duration -- result is signed
BOOST_CXX14_CONSTEXPR date_duration& operator+= (const date_duration& rhs)
{
base_type::operator+= (rhs);
return *this;
}
BOOST_CXX14_CONSTEXPR friend
date_duration operator+ (date_duration rhs, date_duration const& lhs);
//! unary- Allows for dd = -date_duration(2); -> dd == -2
BOOST_CXX14_CONSTEXPR date_duration operator- ()const
{
return date_duration(get_rep() * (-1));
}
//! Division operations on a duration with an integer.
BOOST_CXX14_CONSTEXPR date_duration& operator/= (int divisor)
{
base_type::operator/= (divisor);
return *this;
}
BOOST_CXX14_CONSTEXPR friend date_duration operator/ (date_duration rhs, int lhs);
//! Returns the smallest duration -- used by to calculate 'end'
static BOOST_CXX14_CONSTEXPR date_duration unit()
{
return date_duration(base_type::unit().get_rep());
}
};
inline BOOST_CXX14_CONSTEXPR
date_duration operator- (date_duration rhs, date_duration const& lhs)
{
rhs -= lhs;
return rhs;
}
inline BOOST_CXX14_CONSTEXPR
date_duration operator+ (date_duration rhs, date_duration const& lhs)
{
rhs += lhs;
return rhs;
}
inline BOOST_CXX14_CONSTEXPR date_duration operator/ (date_duration rhs, int lhs)
{
rhs /= lhs;
return rhs;
}
//! Shorthand for date_duration
typedef date_duration days;
} } //namespace gregorian
#if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES)
#include <boost/date_time/date_duration_types.hpp>
#endif
#endif

View File

@@ -0,0 +1,44 @@
#ifndef GREG_DURATION_TYPES_HPP___
#define GREG_DURATION_TYPES_HPP___
/* Copyright (c) 2004 CrystalClear Software, Inc.
* Subject to Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/gregorian/greg_date.hpp>
#include <boost/date_time/int_adapter.hpp>
#include <boost/date_time/adjust_functors.hpp>
#include <boost/date_time/date_duration_types.hpp>
#include <boost/date_time/gregorian/greg_duration.hpp>
namespace boost {
namespace gregorian {
//! config struct for additional duration types (ie months_duration<> & years_duration<>)
struct BOOST_SYMBOL_VISIBLE greg_durations_config {
typedef date date_type;
typedef date_time::int_adapter<int> int_rep;
typedef date_time::month_functor<date_type> month_adjustor_type;
};
typedef date_time::months_duration<greg_durations_config> months;
typedef date_time::years_duration<greg_durations_config> years;
class BOOST_SYMBOL_VISIBLE weeks_duration : public date_duration {
public:
BOOST_CXX14_CONSTEXPR weeks_duration(duration_rep w)
: date_duration(w * 7) {}
BOOST_CXX14_CONSTEXPR weeks_duration(date_time::special_values sv)
: date_duration(sv) {}
};
typedef weeks_duration weeks;
}} // namespace boost::gregorian
#endif // GREG_DURATION_TYPES_HPP___

View File

@@ -0,0 +1,374 @@
#ifndef GREGORIAN_FACET_HPP___
#define GREGORIAN_FACET_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/gregorian/gregorian_types.hpp>
#include <boost/date_time/date_formatting_locales.hpp> // sets BOOST_DATE_TIME_NO_LOCALE
#include <boost/date_time/gregorian/parsers.hpp>
#include <boost/io/ios_state.hpp>
//This file is basically commented out if locales are not supported
#ifndef BOOST_DATE_TIME_NO_LOCALE
#include <string>
#include <memory>
#include <locale>
#include <iostream>
#include <exception>
namespace boost {
namespace gregorian {
//! Configuration of the output facet template
struct BOOST_SYMBOL_VISIBLE greg_facet_config
{
typedef boost::gregorian::greg_month month_type;
typedef boost::date_time::special_values special_value_enum;
typedef boost::gregorian::months_of_year month_enum;
typedef boost::date_time::weekdays weekday_enum;
};
#if defined(USE_DATE_TIME_PRE_1_33_FACET_IO)
//! Create the base facet type for gregorian::date
typedef boost::date_time::date_names_put<greg_facet_config> greg_base_facet;
//! ostream operator for gregorian::date
/*! Uses the date facet to determine various output parameters including:
* - string values for the month (eg: Jan, Feb, Mar) (default: English)
* - string values for special values (eg: not-a-date-time) (default: English)
* - selection of long, short strings, or numerical month representation (default: short string)
* - month day year order (default yyyy-mmm-dd)
*/
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const date& d)
{
typedef boost::date_time::date_names_put<greg_facet_config, charT> facet_def;
typedef boost::date_time::ostream_date_formatter<date, facet_def, charT> greg_ostream_formatter;
greg_ostream_formatter::date_put(d, os);
return os;
}
//! operator<< for gregorian::greg_month typically streaming: Jan, Feb, Mar...
/*! Uses the date facet to determine output string as well as selection of long or short strings.
* Default if no facet is installed is to output a 2 wide numeric value for the month
* eg: 01 == Jan, 02 == Feb, ... 12 == Dec.
*/
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const greg_month& m)
{
typedef boost::date_time::date_names_put<greg_facet_config, charT> facet_def;
typedef boost::date_time::ostream_month_formatter<facet_def, charT> greg_month_formatter;
std::locale locale = os.getloc();
if (std::has_facet<facet_def>(locale)) {
const facet_def& f = std::use_facet<facet_def>(locale);
greg_month_formatter::format_month(m, os, f);
}
else { // default to numeric
boost::io::basic_ios_fill_saver<charT> ifs(os);
os << std::setw(2) << std::setfill(os.widen('0')) << m.as_number();
}
return os;
}
//! operator<< for gregorian::greg_weekday typically streaming: Sun, Mon, Tue, ...
/*! Uses the date facet to determine output string as well as selection of long or short string.
* Default if no facet is installed is to output a 3 char english string for the
* day of the week.
*/
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const greg_weekday& wd)
{
typedef boost::date_time::date_names_put<greg_facet_config, charT> facet_def;
typedef boost::date_time::ostream_weekday_formatter<greg_weekday, facet_def, charT> greg_weekday_formatter;
std::locale locale = os.getloc();
if (std::has_facet<facet_def>(locale)) {
const facet_def& f = std::use_facet<facet_def>(locale);
greg_weekday_formatter::format_weekday(wd, os, f, true);
}
else { //default to short English string eg: Sun, Mon, Tue, Wed...
os << wd.as_short_string();
}
return os;
}
//! operator<< for gregorian::date_period typical output: [2002-Jan-01/2002-Jan-31]
/*! Uses the date facet to determine output string as well as selection of long
* or short string fr dates.
* Default if no facet is installed is to output a 3 char english string for the
* day of the week.
*/
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const date_period& dp)
{
os << '['; //TODO: facet or manipulator for periods?
os << dp.begin();
os << '/'; //TODO: facet or manipulator for periods?
os << dp.last();
os << ']';
return os;
}
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const date_duration& dd)
{
//os << dd.days();
os << dd.get_rep();
return os;
}
//! operator<< for gregorian::partial_date. Output: "Jan 1"
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const partial_date& pd)
{
boost::io::basic_ios_fill_saver<charT> ifs(os);
os << std::setw(2) << std::setfill(os.widen('0')) << pd.day() << ' '
<< pd.month().as_short_string() ;
return os;
}
//! operator<< for gregorian::nth_kday_of_month. Output: "first Mon of Jun"
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os,
const nth_kday_of_month& nkd)
{
os << nkd.nth_week_as_str() << ' '
<< nkd.day_of_week() << " of "
<< nkd.month().as_short_string() ;
return os;
}
//! operator<< for gregorian::first_kday_of_month. Output: "first Mon of Jun"
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os,
const first_kday_of_month& fkd)
{
os << "first " << fkd.day_of_week() << " of "
<< fkd.month().as_short_string() ;
return os;
}
//! operator<< for gregorian::last_kday_of_month. Output: "last Mon of Jun"
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os,
const last_kday_of_month& lkd)
{
os << "last " << lkd.day_of_week() << " of "
<< lkd.month().as_short_string() ;
return os;
}
//! operator<< for gregorian::first_kday_after. Output: "first Mon after"
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os,
const first_kday_after& fka)
{
os << fka.day_of_week() << " after";
return os;
}
//! operator<< for gregorian::first_kday_before. Output: "first Mon before"
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os,
const first_kday_before& fkb)
{
os << fkb.day_of_week() << " before";
return os;
}
#endif // USE_DATE_TIME_PRE_1_33_FACET_IO
/**************** Input Streaming ******************/
#if !defined(BOOST_NO_STD_ITERATOR_TRAITS)
//! operator>> for gregorian::date
template<class charT>
inline
std::basic_istream<charT>& operator>>(std::basic_istream<charT>& is, date& d)
{
std::istream_iterator<std::basic_string<charT>, charT> beg(is), eos;
d = from_stream(beg, eos);
return is;
}
#endif // BOOST_NO_STD_ITERATOR_TRAITS
//! operator>> for gregorian::date_duration
template<class charT>
inline
std::basic_istream<charT>& operator>>(std::basic_istream<charT>& is,
date_duration& dd)
{
long v;
is >> v;
dd = date_duration(v);
return is;
}
//! operator>> for gregorian::date_period
template<class charT>
inline
std::basic_istream<charT>& operator>>(std::basic_istream<charT>& is,
date_period& dp)
{
std::basic_string<charT> s;
is >> s;
dp = date_time::from_simple_string_type<date>(s);
return is;
}
//! generates a locale with the set of gregorian name-strings of type char*
BOOST_DATE_TIME_DECL std::locale generate_locale(std::locale& loc, char type);
//! Returns a pointer to a facet with a default set of names (English)
/* Necessary in the event an exception is thrown from op>> for
* weekday or month. See comments in those functions for more info */
BOOST_DATE_TIME_DECL boost::date_time::all_date_names_put<greg_facet_config, char>* create_facet_def(char type);
#ifndef BOOST_NO_STD_WSTRING
//! generates a locale with the set of gregorian name-strings of type wchar_t*
BOOST_DATE_TIME_DECL std::locale generate_locale(std::locale& loc, wchar_t type);
//! Returns a pointer to a facet with a default set of names (English)
/* Necessary in the event an exception is thrown from op>> for
* weekday or month. See comments in those functions for more info */
BOOST_DATE_TIME_DECL boost::date_time::all_date_names_put<greg_facet_config, wchar_t>* create_facet_def(wchar_t type);
#endif // BOOST_NO_STD_WSTRING
//! operator>> for gregorian::greg_month - throws exception if invalid month given
template<class charT>
inline
std::basic_istream<charT>& operator>>(std::basic_istream<charT>& is,greg_month& m)
{
typedef boost::date_time::all_date_names_put<greg_facet_config, charT> facet_def;
std::basic_string<charT> s;
is >> s;
if(!std::has_facet<facet_def>(is.getloc())) {
std::locale loc = is.getloc();
charT a = '\0';
is.imbue(generate_locale(loc, a));
}
short num = 0;
try{
const facet_def& f = std::use_facet<facet_def>(is.getloc());
num = date_time::find_match(f.get_short_month_names(),
f.get_long_month_names(),
(greg_month::max)(), s); // greg_month spans 1..12, so max returns the array size,
// which is needed by find_match
}
/* bad_cast will be thrown if the desired facet is not accessible
* so we can generate the facet. This has the drawback of using english
* names as a default. */
catch(std::bad_cast&){
charT a = '\0';
#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr< const facet_def > f(create_facet_def(a));
#else
std::unique_ptr< const facet_def > f(create_facet_def(a));
#endif
num = date_time::find_match(f->get_short_month_names(),
f->get_long_month_names(),
(greg_month::max)(), s); // greg_month spans 1..12, so max returns the array size,
// which is needed by find_match
}
++num; // months numbered 1-12
m = greg_month(num);
return is;
}
//! operator>> for gregorian::greg_weekday - throws exception if invalid weekday given
template<class charT>
inline
std::basic_istream<charT>& operator>>(std::basic_istream<charT>& is,greg_weekday& wd)
{
typedef boost::date_time::all_date_names_put<greg_facet_config, charT> facet_def;
std::basic_string<charT> s;
is >> s;
if(!std::has_facet<facet_def>(is.getloc())) {
std::locale loc = is.getloc();
charT a = '\0';
is.imbue(generate_locale(loc, a));
}
short num = 0;
try{
const facet_def& f = std::use_facet<facet_def>(is.getloc());
num = date_time::find_match(f.get_short_weekday_names(),
f.get_long_weekday_names(),
(greg_weekday::max)() + 1, s); // greg_weekday spans 0..6, so increment is needed
// to form the array size which is needed by find_match
}
/* bad_cast will be thrown if the desired facet is not accessible
* so we can generate the facet. This has the drawback of using english
* names as a default. */
catch(std::bad_cast&){
charT a = '\0';
#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr< const facet_def > f(create_facet_def(a));
#else
std::unique_ptr< const facet_def > f(create_facet_def(a));
#endif
num = date_time::find_match(f->get_short_weekday_names(),
f->get_long_weekday_names(),
(greg_weekday::max)() + 1, s); // greg_weekday spans 0..6, so increment is needed
// to form the array size which is needed by find_match
}
wd = greg_weekday(num); // weekdays numbered 0-6
return is;
}
} } //namespace gregorian
#endif
#endif

View File

@@ -0,0 +1,133 @@
#ifndef GREG_MONTH_HPP___
#define GREG_MONTH_HPP___
/* Copyright (c) 2002,2003, 2020 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <boost/date_time/constrained_value.hpp>
#include <boost/date_time/date_defs.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <stdexcept>
#include <string>
namespace boost {
namespace gregorian {
typedef date_time::months_of_year months_of_year;
//bring enum values into the namespace
using date_time::Jan;
using date_time::Feb;
using date_time::Mar;
using date_time::Apr;
using date_time::May;
using date_time::Jun;
using date_time::Jul;
using date_time::Aug;
using date_time::Sep;
using date_time::Oct;
using date_time::Nov;
using date_time::Dec;
using date_time::NotAMonth;
using date_time::NumMonths;
//! Exception thrown if a greg_month is constructed with a value out of range
struct BOOST_SYMBOL_VISIBLE bad_month : public std::out_of_range
{
bad_month() : std::out_of_range(std::string("Month number is out of range 1..12")) {}
};
//! Build a policy class for the greg_month_rep
typedef CV::simple_exception_policy<unsigned short, 1, 12, bad_month> greg_month_policies;
//! A constrained range that implements the gregorian_month rules
typedef CV::constrained_value<greg_month_policies> greg_month_rep;
//! Wrapper class to represent months in gregorian based calendar
class BOOST_SYMBOL_VISIBLE greg_month : public greg_month_rep {
public:
typedef date_time::months_of_year month_enum;
//! Construct a month from the months_of_year enumeration
BOOST_CXX14_CONSTEXPR greg_month(month_enum theMonth) :
greg_month_rep(static_cast<greg_month_rep::value_type>(theMonth)) {}
//! Construct from a short value
BOOST_CXX14_CONSTEXPR greg_month(value_type theMonth) : greg_month_rep(theMonth) {}
//! Convert the value back to a short
BOOST_CXX14_CONSTEXPR operator value_type() const {return value_;}
//! Returns month as number from 1 to 12
BOOST_CXX14_CONSTEXPR value_type as_number() const {return value_;}
BOOST_CXX14_CONSTEXPR month_enum as_enum() const {return static_cast<month_enum>(value_);}
//! Returns 3 char english string for the month ex: Jan, Feb, Mar, Apr
const char*
as_short_string() const
{
static const char* const short_month_names[NumMonths]
= {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec", "NAM"};
return short_month_names[value_-1];
}
//! Returns full name of month as string in english ex: January, February
const char*
as_long_string() const
{
static const char* const long_month_names[NumMonths]
= {"January","February","March","April","May","June","July","August",
"September","October","November","December","NotAMonth"};
return long_month_names[value_-1];
}
#ifndef BOOST_NO_STD_WSTRING
//! Returns 3 wchar_t english string for the month ex: Jan, Feb, Mar, Apr
const wchar_t*
as_short_wstring() const
{
static const wchar_t* const w_short_month_names[NumMonths]
= {L"Jan",L"Feb",L"Mar",L"Apr",L"May",L"Jun",L"Jul",L"Aug",L"Sep",L"Oct",
L"Nov",L"Dec",L"NAM"};
return w_short_month_names[value_-1];
}
//! Returns full name of month as wchar_t string in english ex: January, February
const wchar_t*
as_long_wstring() const
{
static const wchar_t* const w_long_month_names[NumMonths]
= {L"January",L"February",L"March",L"April",L"May",L"June",L"July",L"August",
L"September",L"October",L"November",L"December",L"NotAMonth"};
return w_long_month_names[value_-1];
}
#endif // BOOST_NO_STD_WSTRING
/* parameterized as_*_string functions are intended to be called
* from a template function: "... as_short_string(charT c='\0');" */
const char* as_short_string(char) const
{
return as_short_string();
}
const char* as_long_string(char) const
{
return as_long_string();
}
#ifndef BOOST_NO_STD_WSTRING
const wchar_t* as_short_string(wchar_t) const
{
return as_short_wstring();
}
const wchar_t* as_long_string(wchar_t) const
{
return as_long_wstring();
}
#endif // BOOST_NO_STD_WSTRING
};
} } //namespace gregorian
#endif

View File

@@ -0,0 +1,524 @@
#ifndef GREGORIAN_SERIALIZE_HPP___
#define GREGORIAN_SERIALIZE_HPP___
/* Copyright (c) 2004-2005 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/gregorian/gregorian_types.hpp"
#include "boost/date_time/gregorian/parsers.hpp"
#include "boost/core/nvp.hpp"
namespace boost {
namespace gregorian {
std::string to_iso_string(const date&);
}
namespace serialization {
// A macro to split serialize functions into save & load functions.
// It is here to avoid dependency on Boost.Serialization just for the
// BOOST_SERIALIZATION_SPLIT_FREE macro
#define BOOST_DATE_TIME_SPLIT_FREE(T) \
template<class Archive> \
inline void serialize(Archive & ar, \
T & t, \
const unsigned int file_version) \
{ \
split_free(ar, t, file_version); \
}
/*! Method that does serialization for gregorian::date -- splits to load/save
*/
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::date)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::date_duration)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::date_duration::duration_rep)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::date_period)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::greg_year)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::greg_month)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::greg_day)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::greg_weekday)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::partial_date)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::nth_kday_of_month)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::first_kday_of_month)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::last_kday_of_month)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::first_kday_before)
BOOST_DATE_TIME_SPLIT_FREE(::boost::gregorian::first_kday_after)
#undef BOOST_DATE_TIME_SPLIT_FREE
//! Function to save gregorian::date objects using serialization lib
/*! Dates are serialized into a string for transport and storage.
* While it would be more efficient to store the internal
* integer used to manipulate the dates, it is an unstable solution.
*/
template<class Archive>
void save(Archive & ar,
const ::boost::gregorian::date & d,
unsigned int /* version */)
{
std::string ds = to_iso_string(d);
ar & make_nvp("date", ds);
}
//! Function to load gregorian::date objects using serialization lib
/*! Dates are serialized into a string for transport and storage.
* While it would be more efficient to store the internal
* integer used to manipulate the dates, it is an unstable solution.
*/
template<class Archive>
void load(Archive & ar,
::boost::gregorian::date & d,
unsigned int /*version*/)
{
std::string ds;
ar & make_nvp("date", ds);
try{
d = ::boost::gregorian::from_undelimited_string(ds);
}catch(bad_lexical_cast&) {
gregorian::special_values sv = gregorian::special_value_from_string(ds);
if(sv == gregorian::not_special) {
throw; // no match found, rethrow original exception
}
else {
d = gregorian::date(sv);
}
}
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/,
::boost::gregorian::date* dp,
const unsigned int /*file_version*/)
{
// retrieve data from archive required to construct new
// invoke inplace constructor to initialize instance of date
::new(dp) ::boost::gregorian::date(::boost::gregorian::not_a_date_time);
}
/**** date_duration ****/
//! Function to save gregorian::date_duration objects using serialization lib
template<class Archive>
void save(Archive & ar, const gregorian::date_duration & dd,
unsigned int /*version*/)
{
typename gregorian::date_duration::duration_rep dr = dd.get_rep();
ar & make_nvp("date_duration", dr);
}
//! Function to load gregorian::date_duration objects using serialization lib
template<class Archive>
void load(Archive & ar, gregorian::date_duration & dd, unsigned int /*version*/)
{
typename gregorian::date_duration::duration_rep dr(0);
ar & make_nvp("date_duration", dr);
dd = gregorian::date_duration(dr);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/, gregorian::date_duration* dd,
const unsigned int /*file_version*/)
{
::new(dd) gregorian::date_duration(gregorian::not_a_date_time);
}
/**** date_duration::duration_rep (most likely int_adapter) ****/
//! helper unction to save date_duration objects using serialization lib
template<class Archive>
void save(Archive & ar, const gregorian::date_duration::duration_rep & dr,
unsigned int /*version*/)
{
typename gregorian::date_duration::duration_rep::int_type it = dr.as_number();
ar & make_nvp("date_duration_duration_rep", it);
}
//! helper function to load date_duration objects using serialization lib
template<class Archive>
void load(Archive & ar, gregorian::date_duration::duration_rep & dr, unsigned int /*version*/)
{
typename gregorian::date_duration::duration_rep::int_type it(0);
ar & make_nvp("date_duration_duration_rep", it);
dr = gregorian::date_duration::duration_rep::int_type(it);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/, gregorian::date_duration::duration_rep* dr,
const unsigned int /*file_version*/)
{
::new(dr) gregorian::date_duration::duration_rep(0);
}
/**** date_period ****/
//! Function to save gregorian::date_period objects using serialization lib
/*! date_period objects are broken down into 2 parts for serialization:
* the begining date object and the end date object
*/
template<class Archive>
void save(Archive & ar, const gregorian::date_period& dp,
unsigned int /*version*/)
{
gregorian::date d1 = dp.begin();
gregorian::date d2 = dp.end();
ar & make_nvp("date_period_begin_date", d1);
ar & make_nvp("date_period_end_date", d2);
}
//! Function to load gregorian::date_period objects using serialization lib
/*! date_period objects are broken down into 2 parts for serialization:
* the begining date object and the end date object
*/
template<class Archive>
void load(Archive & ar, gregorian::date_period& dp, unsigned int /*version*/)
{
gregorian::date d1(gregorian::not_a_date_time);
gregorian::date d2(gregorian::not_a_date_time);
ar & make_nvp("date_period_begin_date", d1);
ar & make_nvp("date_period_end_date", d2);
dp = gregorian::date_period(d1,d2);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/, gregorian::date_period* dp,
const unsigned int /*file_version*/)
{
gregorian::date d(gregorian::not_a_date_time);
gregorian::date_duration dd(1);
::new(dp) gregorian::date_period(d,dd);
}
/**** greg_year ****/
//! Function to save gregorian::greg_year objects using serialization lib
template<class Archive>
void save(Archive & ar, const gregorian::greg_year& gy,
unsigned int /*version*/)
{
unsigned short us = gy;
ar & make_nvp("greg_year", us);
}
//! Function to load gregorian::greg_year objects using serialization lib
template<class Archive>
void load(Archive & ar, gregorian::greg_year& gy, unsigned int /*version*/)
{
unsigned short us;
ar & make_nvp("greg_year", us);
gy = gregorian::greg_year(us);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/, gregorian::greg_year* gy,
const unsigned int /*file_version*/)
{
::new(gy) gregorian::greg_year(1900);
}
/**** greg_month ****/
//! Function to save gregorian::greg_month objects using serialization lib
template<class Archive>
void save(Archive & ar, const gregorian::greg_month& gm,
unsigned int /*version*/)
{
unsigned short us = gm.as_number();
ar & make_nvp("greg_month", us);
}
//! Function to load gregorian::greg_month objects using serialization lib
template<class Archive>
void load(Archive & ar, gregorian::greg_month& gm, unsigned int /*version*/)
{
unsigned short us;
ar & make_nvp("greg_month", us);
gm = gregorian::greg_month(us);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/, gregorian::greg_month* gm,
const unsigned int /*file_version*/)
{
::new(gm) gregorian::greg_month(1);
}
/**** greg_day ****/
//! Function to save gregorian::greg_day objects using serialization lib
template<class Archive>
void save(Archive & ar, const gregorian::greg_day& gd,
unsigned int /*version*/)
{
unsigned short us = gd.as_number();
ar & make_nvp("greg_day", us);
}
//! Function to load gregorian::greg_day objects using serialization lib
template<class Archive>
void load(Archive & ar, gregorian::greg_day& gd, unsigned int /*version*/)
{
unsigned short us;
ar & make_nvp("greg_day", us);
gd = gregorian::greg_day(us);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/, gregorian::greg_day* gd,
const unsigned int /*file_version*/)
{
::new(gd) gregorian::greg_day(1);
}
/**** greg_weekday ****/
//! Function to save gregorian::greg_weekday objects using serialization lib
template<class Archive>
void save(Archive & ar, const gregorian::greg_weekday& gd,
unsigned int /*version*/)
{
unsigned short us = gd.as_number();
ar & make_nvp("greg_weekday", us);
}
//! Function to load gregorian::greg_weekday objects using serialization lib
template<class Archive>
void load(Archive & ar, gregorian::greg_weekday& gd, unsigned int /*version*/)
{
unsigned short us;
ar & make_nvp("greg_weekday", us);
gd = gregorian::greg_weekday(us);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/, gregorian::greg_weekday* gd,
const unsigned int /*file_version*/)
{
::new(gd) gregorian::greg_weekday(1);
}
/**** date_generators ****/
/**** partial_date ****/
//! Function to save gregorian::partial_date objects using serialization lib
/*! partial_date objects are broken down into 2 parts for serialization:
* the day (typically greg_day) and month (typically greg_month) objects
*/
template<class Archive>
void save(Archive & ar, const gregorian::partial_date& pd,
unsigned int /*version*/)
{
gregorian::greg_day gd(pd.day());
gregorian::greg_month gm(pd.month().as_number());
ar & make_nvp("partial_date_day", gd);
ar & make_nvp("partial_date_month", gm);
}
//! Function to load gregorian::partial_date objects using serialization lib
/*! partial_date objects are broken down into 2 parts for serialization:
* the day (greg_day) and month (greg_month) objects
*/
template<class Archive>
void load(Archive & ar, gregorian::partial_date& pd, unsigned int /*version*/)
{
gregorian::greg_day gd(1);
gregorian::greg_month gm(1);
ar & make_nvp("partial_date_day", gd);
ar & make_nvp("partial_date_month", gm);
pd = gregorian::partial_date(gd,gm);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/, gregorian::partial_date* pd,
const unsigned int /*file_version*/)
{
gregorian::greg_month gm(1);
gregorian::greg_day gd(1);
::new(pd) gregorian::partial_date(gd,gm);
}
/**** nth_kday_of_month ****/
//! Function to save nth_day_of_the_week_in_month objects using serialization lib
/*! nth_day_of_the_week_in_month objects are broken down into 3 parts for
* serialization: the week number, the day of the week, and the month
*/
template<class Archive>
void save(Archive & ar, const gregorian::nth_kday_of_month& nkd,
unsigned int /*version*/)
{
typename gregorian::nth_kday_of_month::week_num wn(nkd.nth_week());
typename gregorian::nth_kday_of_month::day_of_week_type d(nkd.day_of_week().as_number());
typename gregorian::nth_kday_of_month::month_type m(nkd.month().as_number());
ar & make_nvp("nth_kday_of_month_week_num", wn);
ar & make_nvp("nth_kday_of_month_day_of_week", d);
ar & make_nvp("nth_kday_of_month_month", m);
}
//! Function to load nth_day_of_the_week_in_month objects using serialization lib
/*! nth_day_of_the_week_in_month objects are broken down into 3 parts for
* serialization: the week number, the day of the week, and the month
*/
template<class Archive>
void load(Archive & ar, gregorian::nth_kday_of_month& nkd, unsigned int /*version*/)
{
typename gregorian::nth_kday_of_month::week_num wn(gregorian::nth_kday_of_month::first);
typename gregorian::nth_kday_of_month::day_of_week_type d(gregorian::Monday);
typename gregorian::nth_kday_of_month::month_type m(gregorian::Jan);
ar & make_nvp("nth_kday_of_month_week_num", wn);
ar & make_nvp("nth_kday_of_month_day_of_week", d);
ar & make_nvp("nth_kday_of_month_month", m);
nkd = gregorian::nth_kday_of_month(wn,d,m);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/,
gregorian::nth_kday_of_month* nkd,
const unsigned int /*file_version*/)
{
// values used are not significant
::new(nkd) gregorian::nth_kday_of_month(gregorian::nth_kday_of_month::first,
gregorian::Monday,gregorian::Jan);
}
/**** first_kday_of_month ****/
//! Function to save first_day_of_the_week_in_month objects using serialization lib
/*! first_day_of_the_week_in_month objects are broken down into 2 parts for
* serialization: the day of the week, and the month
*/
template<class Archive>
void save(Archive & ar, const gregorian::first_kday_of_month& fkd,
unsigned int /*version*/)
{
typename gregorian::first_kday_of_month::day_of_week_type d(fkd.day_of_week().as_number());
typename gregorian::first_kday_of_month::month_type m(fkd.month().as_number());
ar & make_nvp("first_kday_of_month_day_of_week", d);
ar & make_nvp("first_kday_of_month_month", m);
}
//! Function to load first_day_of_the_week_in_month objects using serialization lib
/*! first_day_of_the_week_in_month objects are broken down into 2 parts for
* serialization: the day of the week, and the month
*/
template<class Archive>
void load(Archive & ar, gregorian::first_kday_of_month& fkd, unsigned int /*version*/)
{
typename gregorian::first_kday_of_month::day_of_week_type d(gregorian::Monday);
typename gregorian::first_kday_of_month::month_type m(gregorian::Jan);
ar & make_nvp("first_kday_of_month_day_of_week", d);
ar & make_nvp("first_kday_of_month_month", m);
fkd = gregorian::first_kday_of_month(d,m);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/,
gregorian::first_kday_of_month* fkd,
const unsigned int /*file_version*/)
{
// values used are not significant
::new(fkd) gregorian::first_kday_of_month(gregorian::Monday,gregorian::Jan);
}
/**** last_kday_of_month ****/
//! Function to save last_day_of_the_week_in_month objects using serialization lib
/*! last_day_of_the_week_in_month objects are broken down into 2 parts for
* serialization: the day of the week, and the month
*/
template<class Archive>
void save(Archive & ar, const gregorian::last_kday_of_month& lkd,
unsigned int /*version*/)
{
typename gregorian::last_kday_of_month::day_of_week_type d(lkd.day_of_week().as_number());
typename gregorian::last_kday_of_month::month_type m(lkd.month().as_number());
ar & make_nvp("last_kday_of_month_day_of_week", d);
ar & make_nvp("last_kday_of_month_month", m);
}
//! Function to load last_day_of_the_week_in_month objects using serialization lib
/*! last_day_of_the_week_in_month objects are broken down into 2 parts for
* serialization: the day of the week, and the month
*/
template<class Archive>
void load(Archive & ar, gregorian::last_kday_of_month& lkd, unsigned int /*version*/)
{
typename gregorian::last_kday_of_month::day_of_week_type d(gregorian::Monday);
typename gregorian::last_kday_of_month::month_type m(gregorian::Jan);
ar & make_nvp("last_kday_of_month_day_of_week", d);
ar & make_nvp("last_kday_of_month_month", m);
lkd = gregorian::last_kday_of_month(d,m);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/,
gregorian::last_kday_of_month* lkd,
const unsigned int /*file_version*/)
{
// values used are not significant
::new(lkd) gregorian::last_kday_of_month(gregorian::Monday,gregorian::Jan);
}
/**** first_kday_before ****/
//! Function to save first_day_of_the_week_before objects using serialization lib
template<class Archive>
void save(Archive & ar, const gregorian::first_kday_before& fkdb,
unsigned int /*version*/)
{
typename gregorian::first_kday_before::day_of_week_type d(fkdb.day_of_week().as_number());
ar & make_nvp("first_kday_before_day_of_week", d);
}
//! Function to load first_day_of_the_week_before objects using serialization lib
template<class Archive>
void load(Archive & ar, gregorian::first_kday_before& fkdb, unsigned int /*version*/)
{
typename gregorian::first_kday_before::day_of_week_type d(gregorian::Monday);
ar & make_nvp("first_kday_before_day_of_week", d);
fkdb = gregorian::first_kday_before(d);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/,
gregorian::first_kday_before* fkdb,
const unsigned int /*file_version*/)
{
// values used are not significant
::new(fkdb) gregorian::first_kday_before(gregorian::Monday);
}
/**** first_kday_after ****/
//! Function to save first_day_of_the_week_after objects using serialization lib
template<class Archive>
void save(Archive & ar, const gregorian::first_kday_after& fkda,
unsigned int /*version*/)
{
typename gregorian::first_kday_after::day_of_week_type d(fkda.day_of_week().as_number());
ar & make_nvp("first_kday_after_day_of_week", d);
}
//! Function to load first_day_of_the_week_after objects using serialization lib
template<class Archive>
void load(Archive & ar, gregorian::first_kday_after& fkda, unsigned int /*version*/)
{
typename gregorian::first_kday_after::day_of_week_type d(gregorian::Monday);
ar & make_nvp("first_kday_after_day_of_week", d);
fkda = gregorian::first_kday_after(d);
}
//!override needed b/c no default constructor
template<class Archive>
inline void load_construct_data(Archive & /*ar*/,
gregorian::first_kday_after* fkda,
const unsigned int /*file_version*/)
{
// values used are not significant
::new(fkda) gregorian::first_kday_after(gregorian::Monday);
}
} // namespace serialization
} // namespace boost
#endif

View File

@@ -0,0 +1,100 @@
#ifndef GREG_WEEKDAY_HPP___
#define GREG_WEEKDAY_HPP___
/* Copyright (c) 2002,2003,2020 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include <boost/date_time/constrained_value.hpp>
#include <boost/date_time/date_defs.hpp>
#include <boost/date_time/compiler_config.hpp>
#include <stdexcept>
#include <string>
namespace boost {
namespace gregorian {
//bring enum values into the namespace
using date_time::Sunday;
using date_time::Monday;
using date_time::Tuesday;
using date_time::Wednesday;
using date_time::Thursday;
using date_time::Friday;
using date_time::Saturday;
//! Exception that flags that a weekday number is incorrect
struct BOOST_SYMBOL_VISIBLE bad_weekday : public std::out_of_range
{
bad_weekday() : std::out_of_range(std::string("Weekday is out of range 0..6")) {}
};
typedef CV::simple_exception_policy<unsigned short, 0, 6, bad_weekday> greg_weekday_policies;
typedef CV::constrained_value<greg_weekday_policies> greg_weekday_rep;
//! Represent a day within a week (range 0==Sun to 6==Sat)
class BOOST_SYMBOL_VISIBLE greg_weekday : public greg_weekday_rep {
public:
typedef boost::date_time::weekdays weekday_enum;
BOOST_CXX14_CONSTEXPR greg_weekday(value_type day_of_week_num) :
greg_weekday_rep(day_of_week_num)
{}
BOOST_CXX14_CONSTEXPR value_type as_number() const {return value_;}
BOOST_CXX14_CONSTEXPR weekday_enum as_enum() const {return static_cast<weekday_enum>(value_);}
//! Return a 3 digit english string of the day of week (eg: Sun)
const char* as_short_string() const
{
static const char* const short_weekday_names[]
= {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
return short_weekday_names[value_];
}
//! Return a point to a long english string representing day of week
const char* as_long_string() const
{
static const char* const long_weekday_names[]
= {"Sunday","Monday","Tuesday","Wednesday", "Thursday", "Friday", "Saturday"};
return long_weekday_names[value_];
}
#ifndef BOOST_NO_STD_WSTRING
//! Return a 3 digit english wchar_t string of the day of week (eg: Sun)
const wchar_t* as_short_wstring() const
{
static const wchar_t* const w_short_weekday_names[]={L"Sun", L"Mon", L"Tue",
L"Wed", L"Thu", L"Fri", L"Sat"};
return w_short_weekday_names[value_];
}
//! Return a point to a long english wchar_t string representing day of week
const wchar_t* as_long_wstring() const
{
static const wchar_t* const w_long_weekday_names[]= {L"Sunday",L"Monday",L"Tuesday",
L"Wednesday", L"Thursday",
L"Friday", L"Saturday"};
return w_long_weekday_names[value_];
}
#endif // BOOST_NO_STD_WSTRING
};
} } //namespace gregorian
#endif

View File

@@ -0,0 +1,52 @@
#ifndef GREG_YEAR_HPP___
#define GREG_YEAR_HPP___
/* Copyright (c) 2002,2003, 2020 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland
* $Date$
*/
#include <boost/date_time/compiler_config.hpp>
#include <boost/date_time/constrained_value.hpp>
#include <stdexcept>
#include <string>
namespace boost {
namespace gregorian {
//! Exception type for gregorian year
struct BOOST_SYMBOL_VISIBLE bad_year : public std::out_of_range
{
bad_year() :
std::out_of_range(std::string("Year is out of valid range: 1400..9999"))
{}
};
//! Policy class that declares error handling gregorian year type
typedef CV::simple_exception_policy<unsigned short, 1400, 9999, bad_year> greg_year_policies;
//! Generated representation for gregorian year
typedef CV::constrained_value<greg_year_policies> greg_year_rep;
//! Represent a year (range 1400 - 9999)
/*! This small class allows for simple conversion an integer value into
a year for the gregorian calendar. This currently only allows a
range of 1400 to 9999. Both ends of the range are a bit arbitrary
at the moment, but they are the limits of current testing of the
library. As such they may be increased in the future.
*/
class BOOST_SYMBOL_VISIBLE greg_year : public greg_year_rep {
public:
BOOST_CXX14_CONSTEXPR greg_year(value_type year) : greg_year_rep(year) {}
BOOST_CXX14_CONSTEXPR operator value_type() const {return value_;}
};
} } //namespace gregorian
#endif

View File

@@ -0,0 +1,33 @@
#ifndef DATE_TIME_GREG_YMD_HPP__
#define DATE_TIME_GREG_YMD_HPP__
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* 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)
* Author: Jeff Garland
* $Date$
*/
#include "boost/date_time/year_month_day.hpp"
#include "boost/date_time/special_defs.hpp"
#include "boost/date_time/gregorian/greg_day.hpp"
#include "boost/date_time/gregorian/greg_year.hpp"
#include "boost/date_time/gregorian/greg_month.hpp"
namespace boost {
namespace gregorian {
typedef date_time::year_month_day_base<greg_year,
greg_month,
greg_day> greg_year_month_day;
} } //namespace gregorian
#endif

Some files were not shown because too many files have changed in this diff Show More