https://issues.dlang.org/show_bug.cgi?id=469
--- Comment #2 from Dlang Bot ---
dlang-community/dfmt pull request #470 "Fix Issue #469" was merged into master:
- fbd8559ceb0caf46a7503e3fca973064713ad599 by Hackerpilot:
Test case for issue 469
https://github.com/dlang-community/dfmt/pull/470
https://issues.dlang.org/show_bug.cgi?id=973
Andrei Alexandrescu changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=3741
Andrei Alexandrescu changed:
What|Removed |Added
Status|REOPENED|RESOLVED
https://issues.dlang.org/show_bug.cgi?id=2727
Andrei Alexandrescu and...@erdani.com changed:
What|Removed |Added
Version|unspecified |D2
--
https://issues.dlang.org/show_bug.cgi?id=2917
Andrei Alexandrescu and...@erdani.com changed:
What|Removed |Added
Version|2.029 |D2
--
https://issues.dlang.org/show_bug.cgi?id=2965
Andrei Alexandrescu and...@erdani.com changed:
What|Removed |Added
Version|2.029 |D2
--
https://issues.dlang.org/show_bug.cgi?id=3741
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
CC|
here: http://is.gd/roLvbu
I made just a few final tweaks to it - though that does include retitling it
to Introduction to std.datetime on the theory that most of it is applicable
and useful even if you've never used std.date. I tweaked a few things in the
article to match that, but most
from std.date to std.datetime article that will be up on DPL.org soon.
import std.datetime;
auto year = (cast(DateTime)Clock.currTime()).year;
It takes 128 microseconds on my machine. Hope that's fast enough. Otherwise
file a bug report for std.datetime.
--
Configure issuemail: http
tutorial-y stuff like this in general.
I wonder if the title shouldn't be std.datetime tutorial, and migrating
from std.date, since a lot of the article is spent simply explaining
std.datetime. It might actually benefit to rearrange it to put all the
'porting from std.date' parts
can create a pull request and have it added to d-
programming-language.org. I figured that I'd do that after I'd gotten a
sufficient level of feedback, and the article seemed polished enough for it.
I wonder if the title shouldn't be std.datetime tutorial, and migrating
from std.date, since
On 2011-05-14 21:16, Jonathan M Davis wrote:
It recently came to my attention that an article on converting code from
using std.date to using std.datetime would be of value, so I wrote one up.
Since it's an article, and it's within the time period set by Walter for
the article contest, I guess
Fantastic work! I was lost in that std.datetime jungle for a while
now. It's a great read (your English is pretty fluent!).
Btw, I think there's a missing word in this sentence: If what you're
doesn't need that extra boost of efficiency. (doing?).
Fantastic work! I was lost in that std.datetime jungle for a while
now. It's a great read (your English is pretty fluent!).
I would hope so. I'm a native of California. English is my native language.
I'd be more worried about my French fluency (which is good but likely
deteriorating since I
Jonathan M Davis wrote:
On 2011-05-15 03:34, Rainer Schuetze wrote:
- my current uses of datetime are comparing file times and displaying
the file time. Much better than std.date, the times displayed are now
the same as shown by Explorer/dir most of the time, but some are off by
one hour
Jonathan M Davis wrote:
On 2011-05-15 03:34, Rainer Schuetze wrote:
- my current uses of datetime are comparing file times and displaying
the file time. Much better than std.date, the times displayed are now
the same as shown by Explorer/dir most of the time, but some are off by
one
Thanks a lot for writing the article. I was just about to get rid of
std.date and migrate to std.datetime, so it's perfect timing. ;-)
A few nitpicks:
- a short motivation for using hecto-nano-seconds would be nice, it's
not really the most obvious choice.
- Reading this code:
d_time
On 2011-05-15 03:34, Rainer Schuetze wrote:
Thanks a lot for writing the article. I was just about to get rid of
std.date and migrate to std.datetime, so it's perfect timing. ;-)
A few nitpicks:
- a short motivation for using hecto-nano-seconds would be nice, it's
not really the most
Jonathan M Davis wrote:
On 2011-05-15 03:34, Rainer Schuetze wrote:
Thanks a lot for writing the article. I was just about to get rid of
std.date and migrate to std.datetime, so it's perfect timing. ;-)
A few nitpicks:
- a short motivation for using hecto-nano-seconds would be nice, it's
On 2011-05-15 05:26, Rainer Schuetze wrote:
Jonathan M Davis wrote:
On 2011-05-15 03:34, Rainer Schuetze wrote:
Thanks a lot for writing the article. I was just about to get rid of
std.date and migrate to std.datetime, so it's perfect timing. ;-)
A few nitpicks:
- a short
On 2011-05-14 21:16, Jonathan M Davis wrote:
It recently came to my attention that an article on converting code from
using std.date to using std.datetime would be of value, so I wrote one up.
Since it's an article, and it's within the time period set by Walter for
the article contest, I guess
On 2011-05-15 05:26, Rainer Schuetze wrote:
Jonathan M Davis wrote:
On 2011-05-15 03:34, Rainer Schuetze wrote:
- there is an alias for std.string.indexOf in std.datetime, that causes
ambiguities when imported with other modules. (AFAICT it is used to
disambiguate std.algorithm.indexOf
It recently came to my attention that an article on converting code from using
std.date to using std.datetime would be of value, so I wrote one up. Since
it's an article, and it's within the time period set by Walter for the article
contest, I guess that it's in the article contest, but I wrote
CC||bugzi...@kyllingen.net
Resolution||WONTFIX
--- Comment #7 from Lars T. Kyllingstad bugzi...@kyllingen.net 2011-02-03
00:13:24 PST ---
std.date has now been superseded by std.datetime.
--
Configure issuemail
Hello,
I'm in the process of learning D, and to do so I'm converting some older code.
I need to print out the current local date and time, which is causing
some difficulties because std.date doesn't seem adequate in this
respect. I understand there is soon to be a replacement, std.datetime
On Tuesday 18 January 2011 03:34:06 Richard Chamberlain wrote:
Hello,
I'm in the process of learning D, and to do so I'm converting some older
code.
I need to print out the current local date and time, which is causing
some difficulties because std.date doesn't seem adequate
Hi Jonathan,
I'm also stuck with the existing std.date and would want to try out your new
module std.datetime. Do you have any sense when the next release of Phobos is
going to be?
If not, what is the procedure to get a development snapshot of the latest
version of Phobos installed?
thanks
On Tuesday 18 January 2011 04:15:20 %fil wrote:
Hi Jonathan,
I'm also stuck with the existing std.date and would want to try out your
new module std.datetime. Do you have any sense when the next release of
Phobos is going to be?
I don't know. The last release was about a month ago
On 2011-01-18 16:34:53 +, Jonathan M Davis said:
On Tuesday 18 January 2011 04:15:20 %fil wrote:
Hi Jonathan,
I'm also stuck with the existing std.date and would want to try out your
new module std.datetime. Do you have any sense when the next release of
Phobos is going to be?
I don't
On Tue, 2011-01-18 at 08:34 -0800, Jonathan M Davis wrote:
[ . . . ]
I don't know. The last release was about a month ago, and the one before that
was about a month and a half before that. I'm not aware of there being any
hard
and fast rules or plan about when releases are done. However,
On Tuesday, January 18, 2011 09:18:33 Russel Winder wrote:
On Tue, 2011-01-18 at 08:34 -0800, Jonathan M Davis wrote:
[ . . . ]
I don't know. The last release was about a month ago, and the one before
that was about a month and a half before that. I'm not aware of there
being any hard
On 18.01.2011 12:34, Richard Chamberlain wrote:
Hello,
I'm in the process of learning D, and to do so I'm converting some older code.
I need to print out the current local date and time, which is causing
some difficulties because std.date doesn't seem adequate in this
respect. I understand
Hi,
Is there a way to parse a Time string like 15:45 to a Date structure.
Parse method in std.date returns it as invalid. As a hack it works by
prepending it with something like 1-1-1970. But is there a cleaner
way to it.
Thanks
Mandeep
Mandeep Singh Brar Wrote:
Hi,
Is there a way to parse a Time string like 15:45 to a Date structure.
Parse method in std.date returns it as invalid. As a hack it works by
prepending it with something like 1-1-1970. But is there a cleaner
way to it.
Thanks
Mandeep
No. Though std.date
On Wednesday, January 12, 2011 07:29:39 Mandeep Singh Brar wrote:
Hi,
Is there a way to parse a Time string like 15:45 to a Date structure.
Parse method in std.date returns it as invalid. As a hack it works by
prepending it with something like 1-1-1970. But is there a cleaner
way
On Wed, 17 Nov 2010 22:18:09 -0800, Jonathan M Davis wrote:
Structs can't have default constructors, so it's impossible to do that.
In the case of std.datetime, the way to get the current time is
Clock.currTime(), and since SysTime has a toString() method, you can
just print it. So, you can
seconds.
snip
What, exactly, would it do with this table?
std.date works internally in Unix time. I don't know what platforms
have leap second support in the system clock. But one thing I do know
is that Unix time, which is what std.date works in, is defined so that
23:59:60.xxx has the same
Kagamin schrieb:
Jonathan M Davis Wrote:
Honestly, leap seconds are complete stupidity with regards to computers. They
just complicate things.
I think, it's ok, computers work with nominal time and synchronize with world
as needed. Hardly you can catch a bug with leap seconds.
As long as
Daniel Gibson Wrote:
I think, it's ok, computers work with nominal time and synchronize with
world as needed. Hardly you can catch a bug with leap seconds.
As long as you're not Oracle and your enterprise clusterware crap reboots:
Kagamin schrieb:
Daniel Gibson Wrote:
I think, it's ok, computers work with nominal time and synchronize with world
as needed. Hardly you can catch a bug with leap seconds.
As long as you're not Oracle and your enterprise clusterware crap reboots:
Daniel Gibson Wrote:
Synchronization can fail if the code asserts that number of seconds is not
greater than 59 (Jonathan's lib does the same, I think). Is it the cause?
How are leap seconds handled on a computer anyway? Does the clock really
count
to 60 seconds (instead of 59) before
On Wednesday, November 17, 2010 04:15:52 Kagamin wrote:
Daniel Gibson Wrote:
Synchronization can fail if the code asserts that number of seconds is
not greater than 59 (Jonathan's lib does the same, I think). Is it the
cause?
How are leap seconds handled on a computer anyway? Does
On Wednesday, November 17, 2010 09:51:30 Jonathan M Davis wrote:
On Wednesday, November 17, 2010 04:15:52 Kagamin wrote:
Daniel Gibson Wrote:
Synchronization can fail if the code asserts that number of seconds
is not greater than 59 (Jonathan's lib does the same, I think). Is
it the
Jonathan M Davis Wrote:
This is how it looked on linux:
bash-2.05b# date
Thu Jan 1 00:59:58 CET 2009
bash-2.05b# date
Thu Jan 1 00:59:59 CET 2009
bash-2.05b# date
Thu Jan 1 00:59:60 CET 2009
bash-2.05b# date
Thu Jan 1 01:00:00 CET 2009
bash-2.05b# date
Thu Jan 1 01:00:01
On Wednesday 17 November 2010 12:37:18 Kagamin wrote:
Jonathan M Davis Wrote:
This is how it looked on linux:
bash-2.05b# date
Thu Jan 1 00:59:58 CET 2009
bash-2.05b# date
Thu Jan 1 00:59:59 CET 2009
bash-2.05b# date
Thu Jan 1 00:59:60 CET 2009
bash-2.05b# date
Thu
std.date does not have a constructor like this(). My assumption being
that such a constructor would go to the OS and give you an object corresponding
to now.
I've looked at Jonathan's documentation, and I don't see a constructor like
that there either.
So if I want to write a timed log entry, what's
Steve Teale Wrote:
So if I want to write a timed log entry, what's the recommendation?
I won't dare to use std.date.
for answering that question, but my primary gripe was that
the current std.date does not have a constructor like this(). My
assumption being that such a constructor would go to the OS and give you
an object corresponding to now.
I've looked at Jonathan's documentation, and I don't see a constructor like
I have moaned several times about the fact that this module does not have a
method for creating a date from the system clock.
It provides a parse method to convert a string in a limited number of formats.
In the course of doing that, it calls the OS primitive to get the time zone
offset.
So
On Tue, 16 Nov 2010 14:11:05 -0500, Steve Teale
steve.te...@britseyeview.com wrote:
I have moaned several times about the fact that this module does not
have a method for creating a date from the system clock.
It provides a parse method to convert a string in a limited number of
formats.
/time module which will become
std.datetime once its review process is finished. It's far more advanced than
std.date.
However, I would point out though that virtually nothing computer-wise cares
about leap seconds. Posix even specifically ignores them. This currently means
that UTC according
Steve Teale Wrote:
It also strikes me as odd that it does not include a table of leap seconds.
As it stands, some of its methods could return values that were out by a year
for up to four or five seconds on January 1 2011. I'm no expert on UTC,
Gregorian Calendar and such, so I could well
On Tuesday, November 16, 2010 13:00:17 Kagamin wrote:
Steve Teale Wrote:
It also strikes me as odd that it does not include a table of leap
seconds. As it stands, some of its methods could return values that were
out by a year for up to four or five seconds on January 1 2011. I'm no
On Tue, 16 Nov 2010 20:17:53 -0500, Jonathan M Davis jmdavisp...@gmx.com
wrote:
(DST is one of the stupidest ideas even IMHO; I don't even
want to _think_ about how many bugs it's created)
No, the stupidest idea was to *change* DST a few years ago. That had
absolutely no purpose, I can't
On Tuesday 16 November 2010 21:08:48 Steven Schveighoffer wrote:
On Tue, 16 Nov 2010 20:17:53 -0500, Jonathan M Davis jmdavisp...@gmx.com
wrote:
(DST is one of the stupidest ideas even IMHO; I don't even
want to _think_ about how many bugs it's created)
No, the stupidest idea was to
Jonathan M Davis Wrote:
Honestly, leap seconds are complete stupidity with regards to computers. They
just complicate things.
I think, it's ok, computers work with nominal time and synchronize with world
as needed. Hardly you can catch a bug with leap seconds.
http://d.puremagic.com/issues/show_bug.cgi?id=2917
downs default_357-l...@yahoo.de changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=2917
--- Comment #4 from Glenn Haecker ghaec...@idworld.net 2010-01-25 02:59:44
PST ---
Created an attachment (id=555)
patch for std.date.d v.2.039 fixes issues with negative time values
--
Configure issuemail:
with
std.date and to validate modifications by the supplied patch.
Please note that this file and the provided patch were created on Linux and
contain UNIX-style line endings.
In order to compile date_assert.d with v2.039 phobos before the patch is
applied, you'll need to comment out lines 68
http://d.puremagic.com/issues/show_bug.cgi?id=3741
Summary: std.date YearFromTime broken or very slow
Product: D
Version: 1.055
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=2965
Andrei Alexandrescu and...@metalanguage.com changed:
What|Removed |Added
Status|NEW |ASSIGNED
http://d.puremagic.com/issues/show_bug.cgi?id=2965
Brad Roberts bra...@puremagic.com changed:
What|Removed |Added
CC|
Sam Hu Wrote:
Stewart Gordon Wrote:
Read the source of std.date and see for yourself. If it's getting it
wrong, it suggests either your system is misconfigured or you're using
it wrongly. But since you still haven't posted your code, I still can't
comment further.
Stewart
Stewart Gordon Wrote:
Read the source of std.date and see for yourself. If it's getting it
wrong, it suggests either your system is misconfigured or you're using
it wrongly. But since you still haven't posted your code, I still can't
comment further.
Stewart.
Thank you so much
Sam Hu wrote:
Which method/ how can I produce proper result of local datetime?
getUTCtime,UTCtoLocalTime,localTimeToUTC all can not produce the proper result.
Could any body help?Thanks.
Not without seeing your code and knowing what exactly you're trying to do.
Stewart.
to do.
Stewart.
Thank you so much for your attention.Actually my questions are:
1.std.date has no implementation on getting local region system time,is this
true?Say getUTCtime(),UTCtoLocalTime() are all 8 hours behind my region;I
remembered in Tango this is not a problem.gtkD provide a clock demo
http://d.puremagic.com/issues/show_bug.cgi?id=2917
--- Comment #2 from Glenn Haecker ghaec...@idworld.net 2009-05-14 16:20:06
PDT ---
Created an attachment (id=366)
-- (http://d.puremagic.com/issues/attachment.cgi?id=366)
patch for std.date.d v. 2.030 fixes issues with negative time values
http://d.puremagic.com/issues/show_bug.cgi?id=2917
--- Comment #3 from Glenn Haecker ghaec...@idworld.net 2009-05-14 17:06:15
PDT ---
This bit of code shows the bug. There are larger effects as well.
---
string[] testdt = [
1969-12-31
http://d.puremagic.com/issues/show_bug.cgi?id=2965
Summary: std.date: timezone not initialized
Product: D
Version: 2.029
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component
the
job done. It never cranks through more than 11 months on any call. Beyond 11,
it calls addYears() so that adding 60 months is almost as quick as adding 5
years.
I've rebuilt the 2.029 library with this patch to std.date on linux. All
appears to be working well. Someone needs to test the DosDate
http://d.puremagic.com/issues/show_bug.cgi?id=2917
Summary: std.date fails for all years before 1970
Product: D
Version: 2.029
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=2727
bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|
Hello everyone,
It's been quite a while but I've kept close watch on the development of things
here... must say that I am very thankful for all the work everyone has done in
making D what it is today.
The following code:
private import std.date;
void main(){}
generates the runtime
So it does. I'll fix it.
74 matches
Mail list logo