Commit graph

139 commits

Author SHA1 Message Date
jmdavis
a445982fb8 Make UTC and LocalTime singletons be instantiated with CTFE.
Yay! It's now possible to instantiate classes at compile time and then
use them at runtime.
2013-05-04 21:07:11 -07:00
jmdavis
8f7f6d69ac Remove some undocumented, deprecated functions which are slated for removal.
These have been deprecated for a while, but there was some balking
(primarily from Andrei IIRC) at actually removing them when they were
slated for removal, so they were instead made undocumented and slated
for removal after yet another 6 months or so. So, now that that time has
passed, here's another attempt to actually remove them.
2013-03-06 22:19:34 -08:00
k-hara
4785bc179f Fix qualifier to call correct constructor 2013-03-06 21:36:41 +09:00
jmdavis
2735d30f4e Remove all uses of std.metastrings.Format. 2013-02-24 18:42:46 -08:00
k-hara
d4b6479093 fix incorrect method access 2013-02-24 13:05:39 +09:00
jmdavis
ab9c275962 Fix for issue# 9214.
I don't think that it makes any sense for core.time.TickDuration.to to
be a property, since it's a conversion function, not an abstraction for
a variable. However, it _does_ make sense for the example to use one of
TickDuration's property functions instead (it makes the code cleaner
too). So, I've done that. And if the property debate results in
non-property functions being allowed to be called without parens (as
currently seems likely), then anyone wanting to use the to function
without the extra parens can do so then.
2012-12-26 22:27:39 -08:00
Andrei Alexandrescu
d6100b404f Merge pull request #939 from 9rnsr/replace_format
Replacement std.string.format and sformat implementations in November 2012
2012-12-08 19:41:35 -08:00
k-hara
128aa9f8fc Remove remain redundant parenthesis. 2012-12-03 00:53:38 +09:00
jmdavis
1b29851897 Made std.datetime stop using naked numbers with SimpleTimeZone.
Now, almost nothing should be using the SimpleTimeZone functions which
take integers. Rather they're now using the overloads which take a
Duration.
2012-11-26 01:26:57 -08:00
jmdavis
1bf8da4eb1 Mostly convert SimpleTimeZone to using Duration for utcOffset.
We can't completely switch it over at this point, because that would
break code, but this switches it over as much as we can for the moment.
2012-11-24 19:55:57 -08:00
k-hara
01df2f60be Remove redundant parenthesis for getters, and use assignment syntax for setters 2012-11-23 15:07:17 +09:00
k-hara
71e54c199c fix Issue 9046 - typeof(T.init) should have the type T
hasOverloadedOpAssignWithDuration!T returns true even if T is not a mutable type (e.g. for const Date). But, until now, the type of T.init had been accidentally unqualified by bug 9046.
2012-11-19 12:58:47 +09:00
k-hara
b50a11a2cb [Fixup] std.datetime test
toString() in wrapper types should consider const-ness.
2012-11-14 14:12:03 +09:00
k-hara
02c301feaa Supplemental fix for Issue 8940 - Able to modify const/immutable with passing to a templated function by ref
splitUnitsFromHNSecs accepts ref long, so it should not be called with immutable long.
But' it has been accidentally accepted by issue 8940.
2012-11-03 15:30:13 +09:00
jmdavis
3d92608c47 Added more deprecation messages. 2012-10-15 21:40:36 -07:00
jmdavis
14c9a0ae44 Undocumented September deprecations.
The deprecated stuff scheduled for removal in September is now
undocumented and marked (in a normal comment) for removal in March 2013.
2012-09-30 04:15:56 -07:00
Satish BD
7626e7da3b Fix error in comments.
Renamed mseconds to msecs and useconds to usecs.
2012-09-26 00:09:03 +03:00
shoo
8e44dc785e Enhancement for std.datetime.StopWatch
add member function setMeasured
add property running
2012-08-28 22:43:15 +09:00
jmdavis
9ca21ef2e7 Fix for issue# 8459.
isTrusted and isSafelyCallable have been removed. isSafe now checks for
both @safe and @trusted again (but correctly now).
2012-07-28 17:15:32 -07:00
jmdavis
3bd83aad16 Fix for regression bug# 8450.
This requires the fix for bug# 8362 in order to compile and work.
2012-07-26 21:21:30 -07:00
jmdavis
d283d5735c Move August removals to September.
Several deprecated items were listed for removal in August, but it's
looking likely that 2.060 will come out in August, and I'd prefer not to
have them removed for 2.060 given how many items are already in the
changelog, and they're already deprecated, so it'll only affect people
compiling with -d either way. So, I'm changing the ddoc comments to say
September instead of August. They'll be removed in 2.061.
2012-07-23 23:11:07 -07:00
jmdavis
c290caf71f Quick fix to example in std.datetime. 2012-07-22 14:14:02 -07:00
Andrei Alexandrescu
afdf742ddc Merge pull request #670 from jmdavis/benchmark
Attribute inferrence should solve the @safe problem for benchmark now.
2012-07-15 20:31:00 -07:00
jmdavis
02931eb501 Revert "Merge pull request #664 from denis-sh/add-ArrayTarget-template"
This reverts commit f4d0a49493, reversing
changes made to 3cb69914c5.

The merging of request #664 was accidental, and it should not have been
merged. See https://github.com/D-Programming-Language/phobos/pull/664
for details.
2012-07-11 11:49:28 -07:00
Brad Anderson
35c88bd7c3 Fix a link to TickDuration in std.datetime docs 2012-07-11 11:24:15 -06:00
jmdavis
c332a1c3f1 Attribute inferrence should solve the @safe problem for benchmark now. 2012-07-08 17:50:39 -07:00
David Simcha
f4d0a49493 Merge pull request #664 from denis-sh/add-ArrayTarget-template
Add array target template
2012-07-08 13:08:27 -07:00
jmdavis
51824c5b18 Commented out the leap second test.
I may or may not re-add it later, but it's probably going to be broken
for a while, depending on how long it takes the various auto tester
boxes to be updated, since a new leap second was applied on 2012-06-30
right before midnight of 2012-07-01. The total is now 25, but some
machines will think that it's 24 for a while.
2012-07-07 01:32:08 -07:00
Denis Shelomovskij
00c0d61403 Replace typeof(<type>.init[0]) with templates
* ArrayTarget (12)
2012-07-06 13:38:06 +04:00
dawg
51535771f7 speed up SysTime opCmp tests
- cache DateTime to SysTime conversions
- 3000ms => 60ms
2012-06-07 21:20:05 +02:00
dawg
ec9b7f7e34 reduce benchmark count
- the 10M benchmark test accounts for 50% (5s) of datetime's
  unittest runtime
2012-06-07 19:38:01 +02:00
jmdavis
1a4e2892b6 Removed deprecated functions which were to be removed in May 2012. 2012-05-23 00:51:12 -07:00
Jonathan M Davis
49f3ca2e55 Merge pull request #518 from CyberShadow/std-datetime-optimize-filetime
std.datetime: Remove redundant SYSTEMTIME step when converting FILETIME
2012-04-20 20:53:37 -07:00
Nils Boßung
dfe83f155d sep (deprecated) -> dirSeparator 2012-04-04 20:19:24 +02:00
Vladimir Panteleev
dff1cc17d1 std.datetime: Remove redundant SYSTEMTIME step when converting FILETIME
Both FILETIME and SysTime store time as the number of elapsed hnsecs
since a certain (different) epoch. Therefore, the optimal way to convert
between the two would be simply adding/subtracting the epoch difference.
This is not what std.datetime used to do - instead, FILETIME values
were converted to SYSTEMTIME (a structure with year/month/day/etc.
fields), and then created the SysTime result from that (and vice-versa),
which was very inefficient.

The "add epoch difference" method was already used in SysTime.currStdTime.
It has been refactored out and used in FILETIME conversion functions.
2012-04-04 18:00:49 +03:00
jmdavis
95b3fb81ad Removed the deprecated std.date.
Also removed std.datebase, std.dateparse, and std.gregorian.
2012-03-10 16:37:05 -08:00
jmdavis
a27e872f2c Disable Chile test.
It looks like testing America/Santiago just isn't going to work, since
it's failing on FreeBSD. Bleh. Getting a timezone to test in South
America which actually has DST and works on all OSes is a pain (and
seemingly impossible at the moment). All of the other Chile tests were
disabled anyway.
2012-03-08 23:10:40 -08:00
jmdavis
cbda4a0c57 Quick fix for a timezone change.
Chile is screwing with its DST again, and I made the mistake
of leaving one of the tests using a 2012 date instead of a 2011
date (since 2011 has already happened whereas 2012 is still subject
to change).
2012-03-08 22:52:06 -08:00
k-hara
66e13b2c27 Revert "Revert "Merge pull request #120 from 9rnsr/rvalue-struct-literal""
This reverts commit 8a6bfd2529.
2012-02-21 21:03:01 +09:00
Walter Bright
8a6bfd2529 Revert "Merge pull request #120 from 9rnsr/rvalue-struct-literal"
This reverts commit d780d9df0f, reversing
changes made to c6ae86ca4f.
2012-02-20 19:43:12 -08:00
Walter Bright
d780d9df0f Merge pull request #120 from 9rnsr/rvalue-struct-literal
Supplemental changes of dmd/pull/41
2012-02-20 19:24:39 -08:00
jmdavis
88faac2475 Moved removals of deprecated symbols from July to August.
The release didn't happen in January, so July isn't a 6 month
deprecation period anymore.
2012-02-11 02:48:49 -08:00
jmdavis
091609ca1e Moved February deprecations to March.
Having the January deprecations and February deprecations in the same
month seems a bit much to me, since we managed to have both of those
months have quite a few, whereas the next few months have very few if
any. And we're close to release too, so I'd prefer to avoid causing
issues by deprecating them now.
2012-02-11 02:44:46 -08:00
Daniel Murphy
7bed81961a The fix for issue 3731 shows a couple of places in phobos that rely on this bug. std.xml is going away, so work around the issue for now (all problems are caused by opEquals and opCmp not being const correct) and in std.datetime, AA values must be rebindable. 2012-01-28 15:16:57 +11:00
k-hara
d3e1992d86 Add overloads for struct literal and construction that now make rvalue. 2012-01-23 23:41:45 +09:00
jmdavis
5a67c98d05 Moved std.datetime.abs to core.time. 2012-01-16 19:30:46 -08:00
jmdavis
60a0a1c9e7 Deprecated stuff that was scheduled for deprecation in January 2012. 2012-01-02 22:52:36 -08:00
Walter Bright
10a2872229 fix public importing 2012-01-01 12:15:51 -08:00
k-hara
d493815bfe Supplemental changes for 3235 & 6714 2011-12-31 14:39:05 +09:00
Andrei Alexandrescu
5ec35812ba Merge pull request #374 from jmdavis/datetime
Removed static constructors from std.datetime.
2011-12-22 22:44:10 -08:00