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
Howard Hinnant
1e5d2fa8dd
Create local and system time types for timezone functions.
...
* Add sys_time.
* Add sys_days.
* Add sys_seconds.
* Add local_time.
* Add local_days.
* Add local_seconds.
* Rename day_point to sys_days.
* Rename Zone to time_zone.
2016-05-03 23:19:09 -04:00
Howard Hinnant
95271f8337
Minor fixes
2016-04-21 16:21:01 -04:00
Howard Hinnant
70f7d52f88
Enable %Z parsing
2016-04-09 16:04:00 -04:00
Howard Hinnant
cd79376546
Add remote API and auto-download of tzdata.
2016-04-09 14:07:19 -04:00
Howard Hinnant
e79634f61d
Optimize initialization of tz database
...
* Defer expensive parts of the initialization
* The deferment can be turned off with -DLAZY_INIT=0
2016-04-05 16:33:20 -07:00
Howard Hinnant
e8f95dddb7
Add format and parse functionality.
2016-04-03 18:57:02 -04:00
tomy2105
644291ce1b
Fixing tabs
...
Fixing leading tabs from previous commit.
2016-03-15 14:29:26 +01:00
tomy2105
7360d68eb7
Fixing default VS2013 "default"s
...
Fixing VS2013 versions of "default" move constructor and assignment
operator
2016-03-15 14:21:50 +01:00
Howard Hinnant
5acaffc2b3
Add timezone db version and misc cleanup
2016-01-27 20:34:48 -05:00
ivanp2015
50802176f3
TZ stuff fixed for VS2013
2015-11-29 07:56:59 +02:00
Howard Hinnant
db9f0d19ba
Make Zone move-only
2015-11-03 20:01:12 -05:00
Howard Hinnant
f19e7f22c7
Fix overflow in Zone::to_sys_impl when input precision is too fine.
2015-11-03 19:47:03 -05:00
gm
635ec55065
Throw a runtime error if the install folder does not exist.
...
Replace my accidental use of NULL with nullptr.
Improve some comments.
2015-09-27 20:55:55 +13:00
Howard Hinnant
999dfc4b37
Change to MIT copyright
...
* Added unicode copyright to CLDR-derived mapping.
2015-08-08 17:03:43 -04:00
Howard Hinnant
33f923b508
Rename seconds_point to second_point for consistency with day_point.
2015-08-08 13:20:12 -04:00
Howard Hinnant
0d0841f5b8
Rename current_timezone() to current_zone():
...
* Better symmetry with locate_zone(name).
2015-08-08 13:06:04 -04:00
gm
c21e392c81
Initial Win32 support.
...
This library now compiles on Windows but requires VS2015 for Windows.
VS2013 may work but this has not been tested yet.
Requires NOMINMAX to be defined to avoid clashes with the Windows.h
headers and the C++ stl and this libraries Date max functions.
Also known to work equivalently with recent g++ and mingw combinations
but -std=C++14 flag should be set.
C++14 restrictions may be relaxed later. Patches welcome!
g++ 5.1 was tested. It may work with other version but that hasn't been tried.
Mac OS and Linux systems are known to compile with -std=c++11
current_timezone and locate_zone will return iana names not windows
time zone names. This is expected and as designed.
2015-08-06 23:16:03 -04:00
Howard Hinnant
9858887551
Correct some silly spelling errors.
2015-07-18 18:58:48 -04:00
Howard Hinnant
796448e4ad
Initial commit
2015-07-17 22:30:53 -04:00