Commit graph

299 commits

Author SHA1 Message Date
jmdavis
f10ed1a90e Fix issue# 13313: Line Islands Standard Time was missing.
It's included in this update http://support.microsoft.com/kb/2981580 but
has yet to make it into
http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/zone_tzid.html
2014-08-18 01:43:48 -07:00
jmdavis
503699a781 Update the Windows TZ name conversions.
I also added a script at the bottom of std.datetime which can be used to
regenerate the conversions from the latest conversion file at
unicode.org so that it will be much easier to make such updates in the
future.
2014-08-18 01:41:48 -07:00
jmdavis
3a5a11038d Issue# 13319. Make tzDatabaseNameToWindowsTZName return null on failure. 2014-08-18 01:36:23 -07:00
H. S. Teoh
1c867ac48a Fix mismatching param name. 2014-08-14 18:24:34 -07:00
jmdavis
d0a1a7bcf8 Cleanup of a version-else block in std.datetime so that it has an else. 2014-07-30 01:02:33 -07:00
jmdavis
70324eadd8 Clean up uses of zero-length Durations. 2014-07-30 01:02:23 -07:00
jmdavis
521776fbdb Remove last undeprecated uses of SysTime.fracSec. 2014-07-30 01:02:13 -07:00
jmdavis
a9b0ff100c Replace uses of FracSec.from!"hnsecs" with core.time.hnsecs. 2014-07-30 01:02:06 -07:00
jmdavis
8752c521a5 Replace uses of FracSec.from!"hnsecs" with core.time.hnsecs. 2014-07-30 01:01:56 -07:00
jmdavis
1e6a375af5 Replace uses of FracSec.from!"hnsecs" with core.time.hnsecs. 2014-07-30 01:01:47 -07:00
jmdavis
29cba72d82 Replace uses of FracSec.from!"usecs" with core.time.usecs. 2014-07-30 01:01:38 -07:00
jmdavis
a9e48998bb Replace uses of FracSec.from!"msecs" with core.time.msecs. 2014-07-30 01:01:31 -07:00
jmdavis
74935db85f Replace uses of FracSec.from!"msecs" with core.time.msecs. 2014-07-30 01:00:35 -07:00
jmdavis
7f5e2f8cd7 Replace fracSecToISOString and fracSecFromISOString. 2014-07-30 01:00:27 -07:00
jmdavis
42c2158efa Replace use of FracSec in SysTime's API with Duration.
FracSec is overly verbose and based on the recent discussions with
regards to Duration.get and Duration.split, it should be given the boot.
The only non-deprecated place which uses it in Phobos is SysTime, so
this deprecates the functions that use it, and replaces it with ones
that expect a Duration of less than one second.

This means replacing a SysTime constructor and SysTime's fracSec
property. fracSecs is introduced to replace fracSec. It uses a Duration
or takes a template argument for the units and then uses an int
(essentially then creating an overload which is a shortcut for calling
Duration.total or creating a Duration, depending on whether its the
getter or the setter).
2014-07-30 01:00:06 -07:00
Joakim
dc67efc3c4 Deprecate std.c.string and move its contents to druntime 2014-07-13 12:47:26 -05:00
Joakim
11de397dd7 Start getting tests passing on Android/x86 2014-07-09 17:52:15 -05:00
k-hara
8506562b06 Add missing imports 2014-06-24 14:15:20 +09:00
Jonathan M Davis
aa4d081806 Merge pull request #2262 from 9rnsr/fix_imports
Rename local variables to avoid conflict with local imports
2014-06-23 21:33:30 -07:00
k-hara
3c45d63064 fix property enforcement 2014-06-21 18:44:14 +09:00
k-hara
de7430d786 Rename local variables to avoid conflict with local imports 2014-06-21 18:09:06 +09:00
jmdavis
daab9927fa Implement issue# 12886: function for parsing RFC822/5322 date-time format.
The RFC 822 / 5322 date-time format should be taken out and shot, but
unfortunately, it _is_ used in e-mail, HTTP, RTSP, etc. Most code which
deals with it is probably going to need to handle the rest of whatever
spec it's interacting with rather than just the date-time format, but
there are cases where this would be useful on its own (e.g. Martin
apparently needs something like this in the dmd installer), so I'm
adding a function to parse this format and return a SysTime to
std.datetime.

However, that's all I'm adding. I find it very hard to believe that
anyone who needs to produce this particular format doesn't need a lot of
other functionality specific to whatever spec they're dealing with, and
the function for generating the date-time format presumably will be
included with that (and I definitely don't want to encourage this
format's use anyway, since it's a horrible format). So, I'm just adding
a function for parsing the format, not generating it.

parseRFC822DateTime _should_ fully and correctly implement the format as
outlined in RFC 5322 (including the obsolete syntax from RFC 822 that no
one is supposed to be generating anymore and the comment folding
whitespace nonsense that should never have been legal anywhere but at
the end). And the tests are quite thorough, so it's unlikely that I
missed anything, but you never know.
2014-06-17 23:01:39 -07:00
jmdavis
ca72720188 Make std.datetime.SysTime @safe. 2014-06-13 03:39:49 -07:00
jmdavis
e9d970506a Make time zones @safe. 2014-06-13 03:39:45 -07:00
jmdavis
9900470df2 Make std.datetime.DateTime @safe. 2014-06-13 03:00:30 -07:00
jmdavis
93387f0b95 Make std.datetime.TimeOfDay @safe. 2014-06-13 03:00:27 -07:00
jmdavis
75d04b5cf2 Make std.datetime.Date @safe. 2014-06-13 03:00:24 -07:00
jmdavis
73cf16849e Fix deprecation messages caused by recent changes to Duration. 2014-06-11 20:43:32 -07:00
jmdavis
78c2ed05f9 More ref return fixes in std.datetime now that the compiler allows them. 2014-06-03 00:43:54 -07:00
jmdavis
d03f379009 Fix functions which are supposed to return by ref in Date.
Compiler bugs previously prevented these functions from returning by
ref.
2014-06-01 18:32:50 -07:00
jmdavis
7758e81cc0 Fix functions which are supposed to return by ref in SysTime.
Compiler bugs previously prevented these functions from returning by
ref.
2014-06-01 18:32:29 -07:00
jmdavis
8c1f68d6e3 Remove now-unneeded workaround for bug# 4866. 2014-06-01 17:36:25 -07:00
jmdavis
47eb71f40a Fix issue 12828: Fix return type of SimpleTimeZone.utcOffset. 2014-05-31 13:27:31 -07:00
k-hara
f2d8ef6874 fix import declarations 2014-05-29 15:58:41 +09:00
jmdavis
a00adccc41 Converted more of std.datetime's examples to ddoc-ed unit tests.
The ones at the end which are removed from the docs are removed because
they're private, so there's no point in having an example in their
documentation.
2014-05-26 21:07:59 -07:00
jmdavis
a5a4d98ea1 Some cleanup of std.datetime.
This is mostly some cleanup which takes advantage of some stuff like
format being pure now, but it also removes the long month name and
case-insensitive months for simple time. I don't know why it was there
(probably idiocy on my part), and it violates the format for simple time
as defined by the documentation.
2014-05-24 16:05:41 -07:00
jmdavis
020c3a06bf Reformat some ddoc-ed examples so that they're not so long. 2014-05-20 04:27:10 -07:00
jmdavis
99dfa7fd15 Convert std.datetime.Datetime to use ddoc-ed unit tests. 2014-05-20 04:10:15 -07:00
jmdavis
7125352a32 Make std.datetime.Date use ddoc-ed unittests. 2014-05-19 20:02:03 -07:00
jmdavis
77f9f55e2d Convert SysTime's examples to ddoc-ed unittests. 2014-05-18 19:22:19 -07:00
jmdavis
1e10cb7715 Remove the rest of version(testStdDateTime) from std.datetime. 2014-04-30 00:41:38 -07:00
jmdavis
215c81d870 Remove version(testStdDateTime) from std.datetime's interval types. 2014-04-30 00:38:28 -07:00
jmdavis
cc4efc24f0 Remove version(testStdDateTime) from DateTime. 2014-04-30 00:36:36 -07:00
jmdavis
bdd745c2dc Remove version(testStdDateTime) from TimeOfDay. 2014-04-30 00:36:08 -07:00
jmdavis
291c9a8489 Remove version(testStdDateTime) from Date. 2014-04-30 00:35:29 -07:00
jmdavis
9d252dfed5 Remove version(testStdDateTime) from SysTime.
It's no longer necessary and hasn't been for some time (it was to deal
with the fact that dmd ran out of memory on Windows when compiling
std.datetime's unit tests, which hasn't been a problem for a while). So,
we're removing it.
2014-04-30 00:34:44 -07:00
Andrei Alexandrescu
422f59d487 Eliminate _assertPred 2014-03-17 19:26:40 -07:00
Jonathan M Davis
0b066c74f5 Merge pull request #1898 from schuetzm/tzif3
Support TZif format v3
2014-02-05 04:32:10 -08:00
jmdavis
6c08a1e526 Fix issue 12067.
Note that the measureTime examples do not use documented unittest
blocks, because that doesn't work when the documentation is split out
into a separate version(StdDDoc) section.
2014-02-04 00:43:23 -08:00
Marc Schütz
fd18074787 Support TZif format v3
The only difference between v2 and v3 is an extension of the POSIX-TZ-style
string, which Phobos doesn't use anyway.
2014-02-01 20:19:07 +01:00