Howard Hinnant
3ab6510cab
Update copyright to 2017
2017-03-21 21:52:51 -04:00
Howard Hinnant
9e1120c676
Make time_of_day default constructor non-explicit.
...
Add zoned_time const char* overloaded constructor.
2017-03-12 15:18:53 -04:00
gaspardpetit
f4292e6aca
Added Alloc argument to template parameters to support custom allocators in from_stream
2017-03-11 20:13:06 -05:00
Gaspard Petit
a811a20748
Fixes minor typos in comments - no actual change to code
2017-03-08 11:28:35 -05:00
Howard Hinnant
3df43424ac
Add from_stream
2017-03-02 13:16:22 -10:00
Howard Hinnant
1e7e7a214d
Simplify the implementation of format and parse:
...
* For format, all a type must do is implement to_stream.
* For parse, each type X must specialize parse_manip<X,CharT,Traits>.
Each specialization must include a public typedef to itself named
type.
* Each parse_manip specialization must have a stream extraction
operator.
* This commit depends on expression-SFINAE. If this commit breaks
your build, it is likely that your compiler/version does not
support expression-SFINAE. To fix this NO_EXPRESSION_SFINAE
needs to be defined in the configuration area of date.h for
that compiler/version.
2017-02-26 14:10:10 -05:00
Howard Hinnant
ffc8cd0a3b
Add format and parse to tai_time, gps_time, year_month_day
2017-02-26 09:28:15 -05:00
Howard Hinnant
e9d36c6200
Rewrite format and parse in terms of detail::fields<Duration>
...
* Add format and parse to utc_time<Duration>.
* Added more tests.
2017-02-25 20:44:59 -05:00
Howard Hinnant
5c09ae73f2
Work around {} bug for older compilers
2017-02-08 11:32:33 -05:00
Jiangang (Jeff) Zhuang
ea1717e8ab
Define DATE_API empty when building static lib on Windows
2017-01-10 20:31:32 -05:00
Howard Hinnant
634b84eb60
Introduce set_install as suggested by PR 99
...
* Retain install variable as a function local static to maintain
recent fixes to initialization order problems.
2017-01-07 18:27:40 -05:00
Howard Hinnant
e203304afd
Give DATE_API a default definition.
2017-01-05 20:24:46 -05:00
Jiangang (Jeff) Zhuang
4e44539a59
export symbols on Windows
2017-01-04 20:48:34 -05:00
Howard Hinnant
298e9aff2d
Add to_stream which avoids temporary streams and strings.
...
* This is a low-level formatting facility which other functions
such as format call into.
2016-11-25 20:37:51 -05:00
Howard Hinnant
887d7574b1
Default USE_SHELL_API to 1
2016-10-23 18:58:00 -04:00
Howard Hinnant
806c29fddc
Lots of minor changes motivated by reviews of the draft proposal
2016-10-15 17:31:08 -04:00
Howard Hinnant
501609bacf
Make those time_point conversions which can be noexcept, noexcept
2016-10-12 19:48:45 -04:00
Howard Hinnant
fab89b205b
Minor cleanups in the clocks
2016-10-09 20:11:11 -04:00
Howard Hinnant
81b5cc65f0
Remove static conversion functions from clocks
...
The free function converters are sufficient API.
2016-10-08 16:05:10 -04:00
Sascha Zelzer
641cd739c3
VS2013's std::vector does not support incomplete template types.
...
This commit works around this by exposing the zonelet class declaration
to the public tz.h header.
2016-09-15 20:10:04 -04:00
Sascha Zelzer
570a1e699c
Do not use user defined literals for VS2013 compatibility.
2016-09-15 20:10:04 -04:00
Sascha Zelzer
e107bcdef2
Use NOEXCEPT macro for VS2013 compatibility.
2016-09-15 20:10:04 -04:00
Howard Hinnant
3e25bd45f7
Clean up includes
...
Alphabetize and survey for missing and unneeded includes.
2016-08-27 14:18:46 -04:00
Howard Hinnant
ebc20c139b
Move formatting and parsing
...
Moved formatting and parsing of sys_time and local_time from tz.h to
date.h in order to make this functionality available to a wider
audience. Existing code does not need to change. But future code
can #include "date.h" instead of "tz.h" and need not compile tz.cpp nor
link to curl.
Formatting zoned_time remains in tz.h.
2016-08-24 20:54:24 -04:00
Howard Hinnant
952857e721
Correct type-o in error message
2016-08-14 20:35:22 -04:00
Howard Hinnant
0663b7aeb3
Allow only one decimal point to be read under "%Ez".
2016-08-09 23:23:55 -04:00
Howard Hinnant
77435397cb
Handle fractional seconds and offsets better.
2016-08-08 18:25:17 -04:00
Pavel
52e2a0b2cf
Prevent warnings when using -Wundef flag
2016-07-04 11:14:59 -04:00
Howard Hinnant
7331f36318
Enable the converting constructor to actually work.
2016-06-27 22:23:58 -04:00
Howard Hinnant
33cdfc6485
Fix bug in formatting zoned_times produced by ambiguous local times.
2016-06-24 20:33:40 -04:00
Howard Hinnant
ffb876afa6
Fix bug in format
2016-06-17 20:39:07 -04:00
gm
55087c6cbd
HAS_REMOTE_API support for Windows. Adds support for MingW too.
...
* HAS_REMOTE_API still defaults to 0
* When HAS_REMOTE_API=0 only libraries advapi32.lib, ole32.lib and shell32.lib are required.
* Setting HAS_REMOTE_API=1 requires curl: https://curl.haxx.se/libcurl/
*- Also need to manually install 7-Zip (http://www.7-zip.org ).
*- Will automatically install Tinyxml2 (http://www.grinninglizard.com/tinyxml2/ ).
*- Will automatically install http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml
2016-06-16 22:03:12 -04:00
Howard Hinnant
b38d20e126
Replace some chrono literals for C++11 compatibility.
2016-06-09 22:02:26 -04:00
Howard Hinnant
8f5e5e4110
Add convenience converts among sys_time, utc_time, tai_time, and gps_time.
2016-06-08 20:49:19 -04:00
Howard Hinnant
ce4ceb6e9d
Add tai_clock and gps_clock.
2016-06-07 20:03:40 -04:00
Howard Hinnant
f44e692540
Add streaming inserter for utc_time.
...
* Fix bug in utc_to_sys.
2016-06-06 21:05:43 -04:00
gm
7e66cb2e83
Improve cross platform support.
...
Make validate work for C++11 because the library supports it.
Fix an unused variable mistake i made earlier.
Make constructor public, seems it should be. Possible compiler bug?
2016-06-04 13:38:50 -04:00
Howard Hinnant
09cf3bba8d
Create %Ez & %Oz to put ':' in offset for format and parse.
2016-06-04 13:36:40 -04:00
Howard Hinnant
ea2d0d3357
constexpr more stuff and clean up whitespace
2016-05-30 22:09:21 -04:00
Howard Hinnant
76bef1fe01
Support wide streams
2016-05-29 00:15:33 -04:00
Howard Hinnant
f60f61201c
Rename Leap to leap
2016-05-28 20:27:02 -04:00
Howard Hinnant
b0a23f2cff
Rename Link to link
2016-05-28 20:20:28 -04:00
Howard Hinnant
67c31d794e
Protect undocumented constructors
2016-05-28 14:09:46 -04:00
Howard Hinnant
963f4dd80e
Add more options to the parse functionality.
2016-05-22 12:28:47 -04:00
Howard Hinnant
76c906d779
Get off of day_point
2016-05-21 10:24:25 -04:00
Howard Hinnant
823176c1ea
Polish formatting, parsing and utc_time.
2016-05-15 22:45:51 -04:00
Howard Hinnant
8fc76f618e
minor fixes in format and parse
2016-05-09 10:45:35 -04:00
Howard Hinnant
f5f0f80778
Get rid of tz. Hide unnecessary API. Clean up get_info
2016-05-08 22:59:39 -04:00
Howard Hinnant
b1d507df79
Optimize zoned_time streaming operator
2016-05-06 22:48:36 -04:00
Howard Hinnant
4e2a7ac05b
zoned_time with durations coarser than seconds are too error prone.
2016-05-05 22:41:26 -04:00