Commit graph

292 commits

Author SHA1 Message Date
David Nadlinger
fda8267b2c Merge pull request #4250 from wilzbach/remove_at_property
trivial: remove @property from enums
2016-04-27 21:14:23 +01:00
Dmitry Olshansky
c1027f1970 Merge pull request #4246 from wilzbach/sed_spaces_part_2
style fix: add space after 'for' operator
2016-04-27 16:17:18 +04:00
Sebastian Wilzbach
d9de53677e trivial: remove @property from enums 2016-04-27 12:44:57 +03:00
Sebastian Wilzbach
d1714c9afb minor style fixes 2016-04-27 04:18:22 +03:00
Sebastian Wilzbach
5a8988c149 style fix: add space after for operator 2016-04-27 02:04:02 +03:00
Brian Schott
ff298c710d Merge pull request #4240 from wilzbach/space_between_operators_containers
fix space between operators
2016-04-26 14:13:36 -07:00
Dmitry Olshansky
22c7f11265 Merge pull request #4199 from Biotronic/fix-8384
Partial fix of Issue 8384 - std.conv.to should allow conversion betwe…
2016-04-27 00:14:06 +04:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
Dmitry Olshansky
29b0c559f7 Merge pull request #4089 from CyberShadow/pull-20160316-181610-std-file-subsecond
fix Issue 15803 - std.file should support sub-second file time precision on POSIX
2016-04-23 03:20:40 +04:00
biotronic
60a233372a Partial fix of Issue 8384 - std.conv.to should allow conversion between any pair of string/wstring/dstring/char*/wchar*/dchar* 2016-04-16 00:26:54 +00:00
Vladimir Panteleev
7e49cce48d std.datetime: Update Windows time zones for KB3148851 2016-04-13 21:00:47 +00:00
Vladimir Panteleev
f68fc7da6d std.datetime: Add toTimeSpec 2016-03-17 00:25:21 +00:00
Jonathan M Davis
c08032edd4 Merge pull request #4068 from nrTQgc/netbsd_patch
netbsd patch
2016-03-10 22:04:53 -08:00
Nikolay Tolstokulakov
eff74ed2a2 netbsd patch 2016-03-11 10:10:47 +06:00
Steven Schveighoffer
bbc560788f Merge pull request #3983 from jmdavis/timezone
Fix compliance issues with SysTime.to*String and SysTime.from*String.
2016-03-10 12:02:00 -05:00
Sebastian Wilzbach
4f5dd92326 std.datetime - bring plaintext examples back in sync with tests 2016-03-04 12:07:27 +02:00
H. S. Teoh
5c53be7676 Merge pull request #3977 from joakim-noah/android
Android update
2016-02-23 13:51:42 -08:00
Steven Schveighoffer
b0acb7a394 Fix remaining import deprecation messages 2016-02-22 16:03:12 -05:00
Jonathan M Davis
2567a2493a Fix issue# 15654: SysTime.toISOString formats time zones incorrectly.
Previously, it formatted the time zone the same as toISOExtString and
put a colon between the hours and minutes - which is correct for the ISO
extended format, but not the non-extended format. Now, it formats it
correctly per the ISO 9601 standard.

fromISOString temporarily accepts both the extended and non-extended
formats to avoid breaking any programs that have been writing out ISO
strings to read back in later, but eventually, we'll make it so that it
only accepts the non-extended format like it's supposed to.
2016-02-20 13:10:47 -08:00
Joakim
10c01a0614 On Android, update std.datetime to extract timezone data and some other fixes. 2016-02-10 14:25:42 +05:30
Jonathan M Davis
0faa191fc8 Fix issue# 15655.
SysTime.from*String accepted single digit time zones and minutes > 59,
which is against the ISO standard. This commit fixes that.
2016-02-09 22:25:24 -08:00
Jonathan M Davis
7ded5fcf68 Rename SimpleTimeZone.to/fromISOString to to/fromISOExtString.
This is per issue# 15654.
2016-02-07 18:50:27 -08:00
Martin Nowak
6be2087858 Merge pull request #3824 from jmdavis/issue15376
Fix for issue# 15376. Get time zone conversions at runtime.
2016-01-23 15:05:59 +01:00
Jonathan M Davis
635cecee55 Fix for issue# 15376. Get time zone conversions at runtime.
It's proven to be a maintenance problem to maintain the time zone
conversions between the IANA TZ database names and the Windows time zone
names in std.datetime. So, rather than compiling them in, this provides
a way to get them at runtime (which will also make it so in the future,
older releases can work properly on up-to-date Windows boxes, which is
not the case currently with regards to time zone conversions). The
current conversion functions can be deprecated after parseTZConversions
has been out for a release (so that it's possible for users to compile
their code for two releases in a row without getting deprecation
messages).
2016-01-23 04:43:26 -08:00
Martin
756e406281 [Windows] std.datetime: Add North Korean timezone
MS recently added it with https://support.microsoft.com/en-us/kb/3093503
2016-01-21 20:57:03 +01:00
Benjamin L. Merritt
5f08c058ab Changed "Examples:" in Ddoc to "Example:" 2015-12-17 18:32:41 -08:00
Jonathan M Davis
3312e296ef Deprecate the non-benchmarking uses of TickDuration in std.datetime. 2015-12-03 00:38:34 -08:00
Lance Bachmeier
0f23dbae28 Made the new unittests consistent. 2015-11-30 16:21:52 -06:00
Lance Bachmeier
c536217a0a Changed the Examples section to a commented unittest. Made the same changes to SysTime.opBinary. 2015-11-30 16:01:48 -06:00
Lance Bachmeier
fcdf67b36e Added an example of usage of DateTime opBinary. Added a reference to core.time.Duration 2015-11-30 15:06:11 -06:00
Brian Schott
40b2e45e33 Merge pull request #3838 from jmdavis/deprecations
Move some deprecations along.
2015-11-29 11:57:28 -08:00
Vladimir Panteleev
e90be60a67 Merge pull request #3839 from aG0aep6G/ddlink
use DDLINK/DDSUBLINK instead of LINK2 and raw HTML
2015-11-27 04:54:52 +02:00
anonymous
6832caf0be use DDLINK/DDSUBLINK instead of LINK2 and raw HTML
DDLINK/DDSUBLINK use ROOT_DIR which is more robust than a relative path.
2015-11-26 16:04:44 +01:00
Jonathan M Davis
d34164a2ea Move some deprecations along. 2015-11-26 00:28:38 -08:00
Dragos Carp
75cbbef0ab Add asserts for the "compiles" tests 2015-11-16 03:04:07 +01:00
Dragos Carp
c17a621bf2 Fix timezone issue 2015-11-13 05:33:57 -04:30
Dragos Carp
eb293b5063 Fix issue 15320 2015-11-13 03:45:29 +01:00
JakobOvrum
527eeb6e06 Merge pull request #3796 from CyberShadow/pull-20151104-214649
std.datetime: Remove redundant try/catch around GetTimeZoneInformation
2015-11-06 18:44:32 +09:00
Vladimir Panteleev
e1774b6f69 std.datetime: Remove redundant try/catch around GetTimeZoneInformation
GetTimeZoneInformation is a Windows API function, and thus will never
throw a D exception. Presumably, at the time this code was written,
it was not marked as nothrow. However, instead of fixing the function's
signature, the code contained try/catch blocks with messages such as
assert(0, "The impossible happened. GetTimeZoneInformation() threw.");
2015-11-04 21:48:29 +00:00
Kai Nacke
bbd5882948 Add missing functionality for OpenSolaris to std.datetime.
Requires https://github.com/D-Programming-Language/druntime/pull/1423.
2015-11-01 12:04:54 +01:00
Walter Bright
cf22992cbb Merge pull request #3768 from CyberShadow/pull-20151024-051829
HTML fixes
2015-10-24 15:05:00 -07:00
Vladimir Panteleev
86cf380007 HTML fixes 2015-10-24 06:19:23 +00:00
Brian Schott
6ee65f477c Merge pull request #3709 from jmdavis/isTimePoint
Code reduction and clean-up for std.datetime.isTimePoint.
2015-10-16 22:40:32 -07:00
Dragos Carp
d698887729 Remove obsolete TypeTuple references
Replace following names:
std.typetuple      -> std.meta
TypeTuple          -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple     -> Fields

std.traits requires more work than search/replace and is left unchanged.
2015-10-13 20:37:44 +02:00
Jonathan M Davis
bace1f6b43 Code reduction and clean-up for std.datetime.isTimePoint.
This moves all of the private, helper templates for isTimePoint into
isTimePoint (which reduces code) and cleans up their implementation a
bit. The tests have also been improved to actually check types which are
supposed to be false with isTimePoint and the implementation adjusted
accordingly (previously, they failed to compile with isTimePoint rather
than resulting in false).

The checks for TickDuration have been removed in the process, since
we're getting rid of it. No code will break from that, since all it
means is that a type which passes isTimePoint no longer needs to work
with TickDuration. If it does work with TickDuration (as the time point
types in std.datetime will until it's been fully removed), then it will
just continue to work as it has.

This commit also improves the documentation, which was woefully vague.
2015-10-10 21:35:30 -07:00
Jonathan M Davis
e3a239e79a Fix for issue# 15085: Microsoft changed their timezone names again. 2015-09-21 01:48:35 -07:00
Robert burner Schadek
b016472042 std.datetime_doc_update 9 of 9
whitespace
2015-09-18 10:14:42 +02:00
Jonathan M Davis
7b4abd0aa7 Move deprecations along. 2015-08-29 17:01:23 -07:00
Martin Nowak
5ca7ddad60 Merge remote-tracking branch 'upstream/stable' into merge_stable
Conflicts:
	posix.mak

Manually edited:
	std/datetime.d (rename toNormalizedPath -> asNormalizedPath)
2015-07-24 01:28:58 +02:00
Jonathan M Davis
4899aa85d2 Implement issue# 14792: Add SysTime.fromUnixTime.
We've had the ability to convert from unix time to SysTime, but it has
been more unwieldy than it should be. This adds fromUnixTime to go with
toUnixTime.

In addition, these changes solve the problem where you sometimes need a
value for unix time that doesn't fit in time_t (e.g. a 64-bit value on a
32-bit system), or you're dealing with a 64-bit time_t on a 32-bit
system (which Windows sometimes does). So, toUnixTime and
stdTimeToUnixTime now take an optional template argument which indicates
how many bits the result should be (defaulting to match the size of
time_t), and fromUnixTime and unixTimeToStdTime now take long rather
than time_t so that they can accept 64-bit values on 32-bit systems.
2015-07-13 16:21:36 -07:00