Commit graph

71 commits

Author SHA1 Message Date
jmdavis
429f5b4155 Disabled some locale-dependent tests in std.datetime. 2011-09-30 23:59:05 -07:00
jmdavis
824f441382 Temporarily disable test so that tests pass on FreeBSD. 2011-09-26 02:05:28 -07:00
jmdavis
d087bac970 Fixed DST issues in std.datetime.
1. I fixed some issues surrounding DST switches and added much more
thorough unit tests for testing what happens when a DST switch occurs.

2. I also added utcOffsetAt to TimeZone and utcOffset to SysTime to give
the total UTC offset at a specific time.

3. And last but not least, since the unit tests seem to no longer cause
dmd to run out of memory on Windows, std.datetime's unit tests have been
enabled on Windows.

This also fixes Bug# 6181: http://d.puremagic.com/issues/show_bug.cgi?id=6181
2011-09-17 16:51:41 -07:00
Daniel Murphy
1590a5cc38 Issue 6572 - Deprecate typedef
Remove use of deprecated typedef from phobos.  This mostly consists of changing typedef to alias, and disabling unittests that require typedef.  One change to std.registry is needed to work around a bug in typedef (6571).
2011-08-30 13:22:10 +10:00
k-hara
0a136cc44c Additional fix for 6546 2011-08-24 11:55:37 +09:00
k-hara
5395df09c2 Remove std.datetime.DTRebindable 2011-08-24 11:55:36 +09:00
Lars T. Kyllingstad
ff4fb88db7 Update std.datetime and std.file for new std.path 2011-08-18 08:30:22 +02:00
jmdavis
80975d1088 Fixed std.datetime to use the new endian swapping functions 2011-08-14 17:51:07 -07:00
Andrei Alexandrescu
537c59c79e Merge pull request #178 from jmdavis/deprecation
Deprecated stuff which was scheduled to be deprecated in August 2011.
2011-08-14 11:04:21 -07:00
Andrei Alexandrescu
d1adcfcd23 Merge pull request #188 from venix1/master
GDC Win64 patch for Phobos2
2011-08-13 20:51:16 -07:00
Daniel Green
dcbfae3364 Merge GDC Win64 changes. 2011-08-14 00:52:10 -04:00
jmdavis
0ec7697819 Fixed enum values in std.traits to follow Phobos naming conventions. 2011-08-13 00:14:13 -07:00
jmdavis
db5051a5af Changed "Warning" to "Notice" in deprecation messages.
Hopefully, they don't get confused with compiler warnings this way.
2011-08-09 00:39:27 -07:00
jmdavis
28ccdeb8dd Deprecated old date/time stuff. 2011-08-09 00:22:39 -07:00
jmdavis
2c62451020 Fixed uses of TABLE in std.datetime so that they don't double up anymore. 2011-07-27 23:27:32 -07:00
jmdavis
9fcaa2c187 Adjusted SysTime to properly deal with negative FracSec values.
Before, it wasn't possible to have negative FracSecs (which worked great
for SysTime but not so well for Duration). Now, in order to fix
Duration, negative FracSecs are possible, so SysTime has been changed to
throw if it's given a negative FracSec.
2011-07-10 03:04:30 -07:00
jmdavis
302323559a Revert "not really pure"
This reverts commit 4f28db6ffb.

Since Walter put weakly pure back in, these changes need to be undone.

Conflicts:

	std/datetime.d
2011-07-07 01:40:07 -07:00
jmdavis
09b7cf618b Adjusting deprecation dates for a July release. 2011-07-04 01:46:26 -07:00
Jonathan M Davis
da0fd9dbf8 Merge pull request #101 from jmdavis/string
Improvements for std.string, std.uni, and std.ctype.
2011-07-03 00:12:57 -07:00
jmdavis
88c829ca7f Merge branch 'master' into string 2011-06-29 21:25:39 -07:00
jmdavis
e3a592b126 Merged latest master into branch with std.datetime changes.
Conflicts:
	std/datetime.d
2011-06-26 21:14:16 -07:00
Walter Bright
bb53c94eb5 safe function isn't safe 2011-06-26 20:41:03 -07:00
Walter Bright
4f28db6ffb not really pure 2011-06-25 19:58:09 -07:00
jmdavis
a6ef12b6c9 Renamed endOfMonthDay to daysInMonth.
endOfMonthDay is too close to endOfMonth, and std.date had daysInMonth
(which amounts to the same thing), so I'm renaming endOfMonthDay to
daysInMonth. So, endOfMonthDay is now scheduled for deprecation. I also
adjusted the various deprecation messages related to std.datetime so
that they included the month when the items in question would be deprecated.
2011-06-25 09:03:48 -07:00
jmdavis
dd3a0c20a2 Created std.ascii to replace std.ctype.
All of the new, properly camelcased functions in std.ctype have been
moved to std.ascii, and std.ctype has been scheduled for deprecation.
2011-06-14 04:06:54 -07:00
jmdavis
654f35a677 Replaced calls to std.string and std.ctype's tolower with their toLower counterparts. 2011-06-12 16:59:52 -07:00
jmdavis
19ae2b4998 Replace calls to std.ctype.isdigt with std.ctype.isDigit. 2011-06-12 16:59:51 -07:00
jmdavis
ba7d70b858 Fix for issue 6113.
I really should have made those static constructors shared in the first
place, since immutable class and global variables are implicitly shared.
2011-06-05 23:23:10 -07:00
jmdavis
3b628aeb50 Fix to get around issue# 6013. 2011-05-15 19:18:01 -07:00
jmdavis
cf497ec89a Made a public alias private like it should have been in the first place. 2011-05-15 04:06:28 -07:00
jmdavis
1077af7e27 Fixed a typo in my fix for typos. :( 2011-05-10 19:18:33 -07:00
jmdavis
a7d5e3889e Fixed some typos in std.datetime's documentation. 2011-05-10 19:15:11 -07:00
jmdavis
fa8aa916d1 A couple of fixes from Andrei's suggestions. 2011-04-25 00:07:48 -07:00
jmdavis
4f27ab5227 Some formatting changes. 2011-04-19 00:40:45 -07:00
jmdavis
ac392c58be Fix for Issue# 5781.
http://d.puremagic.com/issues/show_bug.cgi?id=5781

Unfortunately, _all_ of the unit tests are now disabled on Windows
(instead of just most of them). Issue #5454 seems to be worse at present.
Hopefully Don's changes to CTFE will help.
2011-04-18 23:33:59 -07:00
jmdavis
218b3f9bc4 A few documentation adjustments. 2011-04-08 22:51:27 -07:00
jmdavis
09483e8af6 Renamed to/fromISOExtendedString to to/fromISOExtString.
toISOExtendedString is annoyingly long - albeit wonderfully accurate -
and toISOExtString seems accurate enough and enough shorter to be worth
the switch. The old names are scheduled to be deprecated.
2011-04-08 22:44:00 -07:00
jmdavis
8e4b25d66e Fix Issue# 5794.
Some documentation fixes for StopWatch and benchmark. I reworked some of
the code as well.

http://d.puremagic.com/issues/show_bug.cgi?id=5794
2011-04-06 01:17:20 -07:00
jmdavis
a08e625bad Fixed bug in setTZEnvVar.
putenv actually keeps a pointer to the string that it's passed, which
setTZEnvVar didn't take into account, so putenv risked having an invalid
pointer as soon as a garbage collection cycle was run. This is an
example of a bug that's easier to find in C++. The inderministic nature
of garbage collection makes it much more insidious. But it's the kind of
thing that's really only going to happen when interacting with code that
isn't D code.
2011-04-02 06:13:32 -07:00
jmdavis
cd3a97c0f6 More improvements to std.datetime's unit tests. 2011-04-02 05:08:03 -07:00
jmdavis
a34673cc82 Fix for bug# 5761.
http://d.puremagic.com/issues/show_bug.cgi?id=5761

A subtle math error involving leap years caused Dec-30 and Dec-31 of A.D.
leap years and Jan-01 and Jan-02 of B.C. leap years to be off by one day.

The revised tests catch the bug.
2011-03-26 16:29:28 -07:00
jmdavis
5e9b52a149 More adjustments to std.datetime's unit tests.
They tests that were changed are a bit scattered, because I was trying
to pick the tests that were related to the test failure in SysTime's day
getter property (which is a manifestation of bug# 5761).
2011-03-26 16:29:28 -07:00
jmdavis
dd91939d49 Initial commit for the reworking of std.datetime's unit tests as requested.
There should be no functional changes to the code - only the unit tests.
Also, the lines which have been changed are now mostly within 80
characters, and those that are over are not over by much. Only a portion
of the tests have been updated, but I'm doing it in chunks.
2011-03-26 16:29:28 -07:00
jmdavis
24142d7bef Merge in Pull Request #12 of D-Programming-Language / phobos.
Conflicts:
	std/datetime.d
2011-03-21 22:38:57 -07:00
jmdavis
e2bfeab535 Some adjustments to the unit tests involving getTimeZone. 2011-03-14 01:45:30 -07:00
jmdavis
2a9e456628 Fixed bug# 5731.
http://d.puremagic.com/issues/show_bug.cgi?id=5731
2011-03-13 20:21:37 -07:00
jmdavis
a585d68a67 Adjusted std.datetime for changes to std.exception.
assertThrown, assertNotThrown, and collectExceptionMsg were removed
from std.datetime, since they're in std.exception now, and assertPred
was renamed to _assertPred in case anyone is trying to use the function
which was under review in their own code (since all templates are
currently public even if declared private).

There should be no functional changes to std.datetime. It's just
adjusting which versions of the unit test functions get called.
2011-03-05 21:42:41 -08:00
Brad Roberts
8c8bc45d2b Fix version identifier from Linux to linux, sigh 2011-02-20 03:19:38 -08:00
Brad Roberts
a536c89336 the UTC zone file isn't in the same place on freebsd as linux and osx. 2011-02-20 04:04:49 +00:00
jmdavis
ac040713d3 std.datetime fixed so that it doesn't need the daylight variable on Posix.
It will still use daylight if it's there, but since FreeBSD doesn't have
it for some reason (in spite of the fact that the daylight variable is
part of Posix), we can't assume that it's there.

Also, now that tzname is in druntime, it has been removed from
std.datetime.

This should fix bug# 5616.
2011-02-19 23:15:29 -08:00