Commit graph

84 commits

Author SHA1 Message Date
Iain Buclaw
f89dc217a6
[dmd-cxx] Backport some more import fixes (#7933)
[dmd-cxx] Backport some more import fixes
merged-on-behalf-of: Iain Buclaw <ibuclaw@users.noreply.github.com>
2021-04-03 01:43:32 +02:00
Iain Buclaw
9d575282ed
[dmd-cxx] Backport platform fixes to phobos (#7784)
[dmd-cxx] Backport platform fixes to phobos
merged-on-behalf-of: Iain Buclaw <ibuclaw@users.noreply.github.com>
2021-02-03 18:01:57 +01:00
Iain Buclaw
814cba478d std.datetime.systime: Skip unsupported clocks in unittests 2021-01-25 10:23:34 +01:00
Diederik de Groot
579c7c55ca Reinstate unittest for dragonfly in std/traits.d
Exclude assertion for dragonfly in std/experimental/allocator/mallocator.d (Needs further investigation, not sure why alliagned_realloc is causing trouble)
cleanup in std/datetime/timezone.d
2019-04-06 15:19:58 +02:00
Diederik de Groot
65e1b46212 Port of phobos to DragonFlyBSD 2019-04-06 15:19:58 +02:00
Diederik de Groot
4177c1851f Port of phobos to DragonFlyBSD
Notes:
- FIXME message related to dragonfly malloc issue (issue reported on upstream dragonfly issue database)
2019-04-06 15:05:12 +02:00
Martin
98888f2902 Solaris fixes for std.datetime 2019-04-06 14:51:56 +02:00
Oleg Nykytenko
d4933a90b1 Solaris: add import clock_gettime to currStdTime 2019-01-21 22:27:25 +01:00
Jonathan M Davis
e428d2a04b Remove deprecated functions from std.datetime.timezone. 2019-01-05 15:39:19 +01:00
Jonathan M Davis
2644ad5d85 Move deprecations along. 2019-01-05 15:32:58 +01:00
Jonathan M Davis
155c32c415 Move some deprecations along. 2019-01-05 14:44:57 +01:00
Iain Buclaw
dd2edb247f Synchronize dmd-cxx with gdc-stable 2019-01-05 14:10:15 +01:00
Jonathan M Davis
80a0b584ee Fix issue 17801: DateTime.fromISOExtString no longer works with const strings.
The from*String functions in std.datetime did not have tests to make
sure that they worked with various character types or various levels of
constness, and some optimizations that were done to the from*String
functions on DateTime for 2.076 broke them for const strings. So, this
adds tests for all character types and levels of constness to each of
the from*String function in std.datetime, and fixes the functionality
for DateTime that then doesn't pass the tests.
2017-09-03 04:08:45 -06:00
wolframw
9a24a87949 Add public examples to std.date.
Affected functions:
- valid!"days"
- daysToDayOfWeek
- monthsToMonth
- yearIsLeapYear
- validTimeUnits
- cmpTimeUnits
2017-07-25 14:47:33 +02:00
Jonathan M Davis
abe4f45d9f Move some std.datetime deprecations along. 2017-07-18 06:37:07 -06:00
Jonathan M Davis
57ef919963 Fix issue 16993: Clarify documentation of std.datetime's toString functions.
I should have done this years ago, but this makes the documentation
clear that std.datetime's toString is intended simply for easy printing
of the type rather than for code that actually cares about the format of
the string. There are other, explicit functions for code that actually
cares.
2017-07-11 06:11:24 -06:00
The Dlang Bot
24e2f9e6e7 Merge pull request #5550 from JackStouffer/DateTime-fromstring
Optimized std.datetime.date.DateTime from string methods
merged-on-behalf-of: Jonathan M Davis <jmdavis@users.noreply.github.com>
2017-07-08 07:42:20 +02:00
The Dlang Bot
e0fc939e38 Merge pull request #5546 from wilzbach/deprecation-halt
Trigger a hard error on deprecation messages
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2017-07-06 01:41:02 +02:00
Sebastian Wilzbach
d8959320e0 Fix deprecations on Windows 2017-07-06 01:01:52 +02:00
The Dlang Bot
abbd350184 Merge pull request #5419 from JackStouffer/timeofday-string-alloc
Remove some extra string allocations in std.datetime.date.datetime
merged-on-behalf-of: Jonathan M Davis <jmdavis@users.noreply.github.com>
2017-07-05 21:36:06 +02:00
Jack Stouffer
58ebf548cc Optimized std.datetime.date.DateTime from string methods 2017-07-05 15:10:45 -04:00
Jack Stouffer
19f2a965b2 Remove some extra string allocations in std.datetime.date.datetime 2017-07-05 10:39:01 -04:00
Sebastian Wilzbach
b37db35389 Fix CircleCI - unittests need to be annotated 2017-07-05 01:51:19 +02:00
The Dlang Bot
044c0afc0a Merge pull request #5448 from Wulfklaue/patch-1
A simple example added to Date - toString
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2017-07-05 01:38:15 +02:00
Vladimir Panteleev
954dccd7f1 std.datetime: Clarify range of integer month parameters
Months are 0-11 in C's tm and the old std.date, so it's better to
clarify the range for every instance of `int month` in the API.
2017-07-01 10:37:15 +00:00
ZombineDev
8ef9c2f07b Make throwing on invalid input optional in stda.datetime.date.Date.dayOfYear
* Keep throwing on invalid input in the public API
* Use assert for Date.this(), where exceptions are not appropriate
2017-06-30 20:38:22 +03:00
ZombineDev
3f8b5b30e7 Annotate with @nogc most of std.datetime.date's API 2017-06-30 20:37:50 +03:00
Sebastian Wilzbach
2ec7e9199b Fix Ddoc comments 2017-06-21 05:10:24 +02:00
The Dlang Bot
857fdc1312 Merge pull request #5486 from wilzbach/fix-ddoc
Fix invalid undefined Ddoc macros
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2017-06-15 17:39:23 +02:00
Sebastian Wilzbach
e7111d4fd0 Fix invalid undefined Ddoc macros 2017-06-15 11:00:47 +02:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
This reverts commit 998ad51fd7.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
998ad51fd7 Sort selective imports 2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d Sort imports 2017-06-12 07:54:38 +02:00
Wulfklaue
e7c8d2b1dc A simple example added to Date - toString
First attempt at using GIT for updating the documentation. Added a simple example to the date documentation.
2017-06-07 18:05:46 +02:00
The Dlang Bot
01dc3eabf2 Merge pull request #5404 from JackStouffer/date-fromISOString
Optimized std.datetime.date.Date.fromISOString
merged-on-behalf-of: Jonathan M Davis <jmdavis@users.noreply.github.com>
2017-06-06 12:44:27 +02:00
Sebastian Wilzbach
32e50bd7eb Reenable publictests checking on CircleCi 2017-05-26 18:27:14 +02:00
The Dlang Bot
b32e2bd791 Merge pull request #5413 from JackStouffer/time-fromISOString
Optimized std.datetime.date.TimeOfDay.fromISOString
merged-on-behalf-of: Jonathan M Davis <jmdavis@users.noreply.github.com>
2017-05-26 09:41:28 +02:00
Jack Stouffer
e7439425e8 Added example to SysTime.isoWeek 2017-05-22 15:42:40 -04:00
Jack Stouffer
e0865f5131 Optimized std.datetime.date.TimeOfDay.fromISOString 2017-05-22 10:14:01 -04:00
Jack Stouffer
784a547ffc Further improvements 2017-05-19 21:45:05 -04:00
Jack Stouffer
eade7d35fa Optimized std.datetime.date.fromISOString 2017-05-19 16:02:14 -04:00
The Dlang Bot
2a0560e673 Merge pull request #5389 from jmdavis/issue_16053
Fix it so that SysTime's from*String supports more than 7 digits.
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2017-05-17 05:13:10 +02:00
Vladimir Panteleev
50bdbff3fe std.datetime.stopwatch: Fix another random test failure on Win32 2017-05-17 00:13:56 +00:00
Vladimir Panteleev
6dbcf46413 std.datetime.stopwatch: Fix random test failure on Win32 2017-05-15 04:26:12 +00:00
The Dlang Bot
df0770a046 Merge pull request #5367 from jmdavis/stopwatch
Add the MonoTime equivalents of std.datetime.StopWatch/benchmark.
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2017-05-14 19:10:07 +02:00
Jonathan M Davis
21c09f18d3 Issue 16053: Fix it so that SysTime's from*String supports more than 7 digits.
ISO 8601 says that it's up to the application to decide how many digits
to put in the fractional seconds if they're present. SysTime.to*String
puts up to 7 (stripping trailing zeroes), because that's
hecto-nanosecond precision, and SysTime holds the time in
hecto-nanoseconds. Currently, from*String only accepts up to 7 digits in
the fractional seconds, which _does_ follow the spec in that (per the
spec) the number of digits is up to the applications. However, while we
never emit more than 7 digits, other applications do, so only accepting
7 digits makes us incompatible with them, whereas accepting them would
make us more compatible with other programs, and it would actually be
more efficient, since we'd have fewer checks in the code.

So, these changes make is so that SysTime.from*String accepts more than 7
digits in the fractional seconds, but the additional digits are
truncated (since SysTime doesn't support more than 7 digits of
precision).
2017-05-13 07:18:41 -07:00
Jonathan M Davis
522952b0c9 Fix std.datetime autotester failure for FreeBSD 10.3/11.
The tests fail depending on your timezone due to a known FreeBSD bug, so
we need to disable them until the bug in FreeBSD gets fixed.
2017-05-07 17:43:39 +02:00
Jonathan M Davis
90971797e6 Warn about impending deprecation of functions in std.datetime.package. 2017-05-07 10:54:25 +02:00
Jonathan M Davis
ac62197c36 Add the MonoTime equivalents of std.datetime.StopWatch/benchmark.
std.datetime.package has StopWatch, benchmark, comparingBenchmark, and
measureTime, all of which use TickDuration (which would be deprecated,
but it can't be deprecated as long as those functions in std.datetime
are deprecated). This commit introduces
std.datetime.stopwatch to replace those functions in std.datetime. In
order to avoid symbol conflicts, std.datetime.stopwatch will not be
publicly import in std.datetime.package until the old symbols have been
removed.

std.datetime.experimental.stopwatch contains StopWatch and benchmark
which have essentially the same APIs as the ones in
std.datetime.package, but they use MonoTime and Duration.

comparingBenchmark has not been ported to MonoTime and Duration, because
it is simply a wrapper around benchmark.

measureTime has not been ported to MonoTime and Duration, because it is
equivalent to using StopWatch with a scope(exit) statement.

The old functionality will be deprecated the major release after the new
symbols have been introduced.
2017-05-07 10:54:25 +02:00
Sebastian Wilzbach
3d6b8bb436 Fix Ddoc links in std.datetime 2017-05-06 22:04:58 +02:00