[Issue 469] Incorrect documentation in std.date

2020-03-09 Thread d-bugmail--- via Digitalmars-d-bugs
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

[Issue 973] [std.date] DST (daylight savings time) not applied in southern hemisphere

2015-11-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=973 Andrei Alexandrescu changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 3741] std.date YearFromTime broken or very slow

2015-11-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3741 Andrei Alexandrescu changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 2727] std.date Cyclic dependency

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2727 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Version|unspecified |D2 --

[Issue 2917] std.date fails for all years before 1970

2015-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2917 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Version|2.029 |D2 --

[Issue 2965] std.date: timezone not initialized

2015-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2965 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Version|2.029 |D2 --

[Issue 3741] std.date YearFromTime broken or very slow

2014-04-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3741 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC|

Re: Article Review: Migrating from std.date to std.datetime [final version]

2011-05-31 Thread Jonathan M Davis
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

[Issue 3741] std.date YearFromTime broken or very slow

2011-05-24 Thread d-bugmail
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-18 Thread Steven Schveighoffer
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-18 Thread Jonathan M Davis
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-17 Thread Jonathan M Davis
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-16 Thread Andrej Mitrovic
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?).

Re: Article Review: Migrating from std.date to std.datetime

2011-05-16 Thread Jonathan M Davis
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-16 Thread Rainer Schuetze
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-16 Thread Jonathan M Davis
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-15 Thread Rainer Schuetze
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-15 Thread Jonathan M Davis
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-15 Thread Rainer Schuetze
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-15 Thread Jonathan M Davis
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-15 Thread Jonathan M Davis
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

Re: Article Review: Migrating from std.date to std.datetime

2011-05-15 Thread Jonathan M Davis
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

Article Review: Migrating from std.date to std.datetime

2011-05-14 Thread Jonathan M Davis
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

[Issue 2917] std.date fails for all years before 1970

2011-02-03 Thread d-bugmail
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

std.date / std.datetime

2011-01-18 Thread Richard Chamberlain
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

Re: std.date / std.datetime

2011-01-18 Thread Jonathan M Davis
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

Re: std.date / std.datetime

2011-01-18 Thread %fil
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

Re: std.date / std.datetime

2011-01-18 Thread Jonathan M Davis
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

Re: std.date / std.datetime

2011-01-18 Thread Richard Chamberlain
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

Re: std.date / std.datetime

2011-01-18 Thread Russel Winder
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,

Re: std.date / std.datetime

2011-01-18 Thread Jonathan M Davis
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

Re: std.date / std.datetime

2011-01-18 Thread torhu
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

Parse Time using std.date

2011-01-12 Thread Mandeep Singh Brar
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

Re: Parse Time using std.date

2011-01-12 Thread Jesse Phillips
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

Re: Parse Time using std.date

2011-01-12 Thread Jonathan M Davis
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

Re: std.date

2010-11-18 Thread Steve Teale
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

Re: std.date

2010-11-18 Thread Stewart Gordon
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

Re: std.date

2010-11-17 Thread Daniel Gibson
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

Re: std.date

2010-11-17 Thread Kagamin
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:

Re: std.date

2010-11-17 Thread Daniel Gibson
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:

Re: std.date

2010-11-17 Thread Kagamin
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

Re: std.date

2010-11-17 Thread Jonathan M Davis
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

Re: std.date

2010-11-17 Thread Jonathan M Davis
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

Re: std.date

2010-11-17 Thread Kagamin
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

Re: std.date

2010-11-17 Thread Jonathan M Davis
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

Re: std.date

2010-11-17 Thread Steve Teale
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

Re: std.date

2010-11-17 Thread Kagamin
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.

Re: std.date

2010-11-17 Thread Jonathan M Davis
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

std.date

2010-11-16 Thread Steve Teale
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

Re: std.date

2010-11-16 Thread Steven Schveighoffer
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.

Re: std.date

2010-11-16 Thread Jonathan M Davis
/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

Re: std.date

2010-11-16 Thread Kagamin
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

Re: std.date

2010-11-16 Thread Jonathan M Davis
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

Re: std.date

2010-11-16 Thread Steven Schveighoffer
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

Re: std.date

2010-11-16 Thread Jonathan M Davis
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

Re: std.date

2010-11-16 Thread Kagamin
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.

[Issue 2917] std.date fails for all years before 1970

2010-05-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2917 downs default_357-l...@yahoo.de changed: What|Removed |Added CC|

[Issue 2917] std.date fails for all years before 1970

2010-01-25 Thread d-bugmail
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:

[Issue 2917] std.date fails for all years before 1970

2010-01-25 Thread d-bugmail
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

[Issue 3741] New: std.date YearFromTime broken or very slow

2010-01-25 Thread d-bugmail
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

[Issue 2965] std.date: timezone not initialized

2009-10-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2965 Andrei Alexandrescu and...@metalanguage.com changed: What|Removed |Added Status|NEW |ASSIGNED

[Issue 2965] std.date: timezone not initialized

2009-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2965 Brad Roberts bra...@puremagic.com changed: What|Removed |Added CC|

Re: D2 phobos std.date question

2009-07-15 Thread John C
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

Re: D2 phobos std.date question

2009-07-14 Thread Sam Hu
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

Re: D2 phobos std.date question

2009-07-13 Thread Stewart Gordon
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.

Re: D2 phobos std.date question

2009-07-13 Thread Sam Hu
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

[Issue 2917] std.date fails for all years before 1970

2009-05-14 Thread d-bugmail
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

[Issue 2917] std.date fails for all years before 1970

2009-05-14 Thread d-bugmail
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

[Issue 2965] New: std.date: timezone not initialized

2009-05-12 Thread d-bugmail
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

[Issue 2917] std.date fails for all years before 1970

2009-05-04 Thread d-bugmail
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

[Issue 2917] New: std.date fails for all years before 1970

2009-04-30 Thread d-bugmail
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

[Issue 2727] std.date Cyclic dependency

2009-04-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2727 bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

std.date Cyclic dependency

2009-03-10 Thread Tyro[a.c.edwards]
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

Re: std.date Cyclic dependency

2009-03-10 Thread Walter Bright
So it does. I'll fix it.