Re: std.datetime & timzone specifier: 2018-11-06T16:52:03+01:00

2020-03-09 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, March 8, 2020 11:19:33 PM MDT tchaloupka via Digitalmars-d-learn wrote: > On Sunday, 8 March 2020 at 17:28:33 UTC, Robert M. Münch wrote: > > On 2020-03-07 12:10:27 +, Jonathan M Davis said: > > > > DateTime dt = > > DateTime.fromISOExtString(split("2018-11-06T16:52:03+01:00", > >

Re: std.datetime & timzone specifier: 2018-11-06T16:52:03+01:00

2020-03-08 Thread tchaloupka via Digitalmars-d-learn
On Sunday, 8 March 2020 at 17:28:33 UTC, Robert M. Münch wrote: On 2020-03-07 12:10:27 +, Jonathan M Davis said: DateTime dt = DateTime.fromISOExtString(split("2018-11-06T16:52:03+01:00", regex("\\+"))[0]); IMO such a string should be feedable directly to the function. You just need

Re: std.datetime & timzone specifier: 2018-11-06T16:52:03+01:00

2020-03-08 Thread kdevel via Digitalmars-d-learn
g should be feedable directly to the function. It took me less than an hour to figure out how to provide a local version of std.datetime named local.datetime: ```local/datetime.d module local.datetime; public import std.datetime; struct DateTime { std.datetime.DateTime dt; alias dt this

Re: std.datetime & timzone specifier: 2018-11-06T16:52:03+01:00

2020-03-08 Thread Robert M. Münch via Digitalmars-d-learn
On 2020-03-07 12:10:27 +, Jonathan M Davis said: I take it that you're asking why you don't get the time zone as part of the string when you call one of the to*String functions? The problem is, the from* functions give an error, that this is not an ISO date. I get this in an XML

Re: std.datetime & timzone specifier: 2018-11-06T16:52:03+01:00

2020-03-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, March 7, 2020 2:43:47 AM MST Robert M. Münch via Digitalmars-d- learn wrote: > It looks like std.datetime is not anticipating the +1:00 part of a date > like: "2018-11-06T16:52:03+01:00" > > Those dates are used all over on the internet and I'mm wondering why >

std.datetime & timzone specifier: 2018-11-06T16:52:03+01:00

2020-03-07 Thread Robert M. Münch via Digitalmars-d-learn
It looks like std.datetime is not anticipating the +1:00 part of a date like: "2018-11-06T16:52:03+01:00" Those dates are used all over on the internet and I'mm wondering why it's not supported. Any reason? Is this +01:00 not ISO conforming? -- Robert M. Münch http://www.sap

Re: Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-22 Thread Jonathan M Davis via Digitalmars-d-learn
y project no longer > >> build: > >> > >> zero.lib(core_cde_4a4f.obj) : error LNK2001: unresolved > >> external symbol _D3std8d > >> atetime9LocalTime6opCallFNaNbNeZyC3std8datetime9LocalTime > >> > >> and many more. All about std.

Re: Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-22 Thread Domain via Digitalmars-d-learn
atetime9LocalTime6opCallFNaNbNeZyC3std8datetime9LocalTime and many more. All about std.datetime. Then it sounds like you need to make sure that you rebuild your project and all of its dependencies (which you should be doing with any compiler upgrade anyway, since they're not ABI compatible). Your

Re: Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-22 Thread Domain via Digitalmars-d-learn
atetime9LocalTime6opCallFNaNbNeZyC3std8datetime9LocalTime and many more. All about std.datetime. Then it sounds like you need to make sure that you rebuild your project and all of its dependencies (which you should be doing with any compiler upgrade anyway, since they're not ABI compatible). Your

Re: Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-21 Thread Domain via Digitalmars-d-learn
atetime9LocalTime6opCallFNaNbNeZyC3std8datetime9LocalTime and many more. All about std.datetime. Then it sounds like you need to make sure that you rebuild your project and all of its dependencies (which you should be doing with any compiler upgrade anyway, since they're not ABI compatible). Your

Re: Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-21 Thread Jonathan M Davis via Digitalmars-d-learn
me > > and many more. All about std.datetime. Then it sounds like you need to make sure that you rebuild your project and all of its dependencies (which you should be doing with any compiler upgrade anyway, since they're not ABI compatible). Your code should work just fine with std.datetim

Re: Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-21 Thread zabruk70 via Digitalmars-d-learn
https://dlang.org/changelog/2.075.0.html#split-std-datetime

Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-21 Thread Domain via Digitalmars-d-learn
After upgrade dmd to latest 2.075.0, my project no longer build: zero.lib(core_cde_4a4f.obj) : error LNK2001: unresolved external symbol _D3std8d atetime9LocalTime6opCallFNaNbNeZyC3std8datetime9LocalTime and many more. All about std.datetime.

Re: std.getopt and std.datetime

2017-05-13 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2017-05-13 at 02:23 -0700, Jonathan M Davis via Digitalmars-d- learn wrote: > […] > At best, it's slang. It's not proper anything. > > https://github.com/dlang/phobos/pull/5388 > > - Jonathan M Davis Indeed. Thanks for getting a pull request in to ameliorate the difficulty. --

Re: std.getopt and std.datetime

2017-05-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, May 13, 2017 06:53:25 Russel Winder via Digitalmars-d-learn wrote: > Is there a canonical, idiomatic way of processing std.datetime objects > using std.getopt? > > Currently, I am suffering: > > /usr/include/d/std/getopt.d(921): Error: static assert "Dunno

Re: std.getopt and std.datetime

2017-05-13 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2017-05-13 at 06:05 +, Vladimir Panteleev via Digitalmars- d-learn wrote: > On Saturday, 13 May 2017 at 05:53:25 UTC, Russel Winder wrote: > > Is there a canonical, idiomatic way of processing std.datetime > > objects using std.getopt? > > As std.getopt is goin

Re: std.getopt and std.datetime

2017-05-13 Thread Vladimir Panteleev via Digitalmars-d-learn
On Saturday, 13 May 2017 at 05:53:25 UTC, Russel Winder wrote: Is there a canonical, idiomatic way of processing std.datetime objects using std.getopt? As std.getopt is going to give you strings, you need to convert strings to SysTime values, e.g. using fromSimpleString: import std.datetime

std.getopt and std.datetime

2017-05-12 Thread Russel Winder via Digitalmars-d-learn
Is there a canonical, idiomatic way of processing std.datetime objects using std.getopt? Currently, I am suffering: /usr/include/d/std/getopt.d(921): Error: static assert "Dunno how to deal with type SysTime*" which on the one hand is understandable, albeit dreadful English,

Re: std.datetime

2017-02-10 Thread drug via Digitalmars-d-learn
error - years should start from 1, not 0. But if months or days start from 0 std.datetime throws exception and don't for years - it isn't clear that zero year is negative one (in that mean that stdTime for '' years will be negative. As the documentation states in multiple places, std.datetime

Re: std.datetime

2017-02-10 Thread Jonathan M Davis via Digitalmars-d-learn
> >> But if months or days start from 0 std.datetime throws exception and > >> don't for years - it isn't clear that zero year is negative one (in > >> that > >> mean that stdTime for '' years will be negative. > > > > As the documentation states

Re: std.datetime

2017-02-10 Thread drug via Digitalmars-d-learn
10.02.2017 18:02, Jonathan M Davis via Digitalmars-d-learn пишет: On Friday, February 10, 2017 14:35:28 drug via Digitalmars-d-learn wrote: I found error - years should start from 1, not 0. But if months or days start from 0 std.datetime throws exception and don't for years - it isn't clear

Re: std.datetime

2017-02-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, February 10, 2017 14:35:28 drug via Digitalmars-d-learn wrote: > I found error - years should start from 1, not 0. > But if months or days start from 0 std.datetime throws exception and > don't for years - it isn't clear that zero year is negative one (in that > mean

Re: std.datetime

2017-02-10 Thread drug via Digitalmars-d-learn
10.02.2017 14:15, drug пишет: unittest { import std.datetime : SysTime, UTC; { auto st = SysTime(); st.timezone(UTC()); long date = st.fromISOExtString("2017-02-10T00:00:00Z").stdTime, time_of_day = st.fromISOExtString("-

std.datetime

2017-02-10 Thread drug via Digitalmars-d-learn
unittest { import std.datetime : SysTime, UTC; { auto st = SysTime(); st.timezone(UTC()); long date = st.fromISOExtString("2017-02-10T00:00:00Z").stdTime, time_of_day = st.fromISOExtString(&quo

Re: Get current date and time with std.datetime

2016-08-22 Thread Joel via Digitalmars-d-learn
a SysTime from the string. auto currentTime = Clock.currTime(); auto timeString = currentTime.toISOExtString(); auto restoredTime = SysTime.fromISOExtString(timeString); This is what I use: auto getDateTimeString() { import std.string; import std.datetime

Re: Get current date and time with std.datetime

2016-07-01 Thread Zekereth via Digitalmars-d-learn
On Thursday, 30 June 2016 at 21:18:22 UTC, Luke Picardo wrote: Why is it so hard to simply get the current date and time formatted properly in a string? There are no examples of this in your documentation yet this is probably one of the most used cases. To get the current time, use

Re: Get current date and time with std.datetime

2016-06-30 Thread Luke Picardo via Digitalmars-d-learn
On Monday, 24 October 2011 at 15:29:41 UTC, Jonathan M Davis wrote: On Friday, October 07, 2011 19:58:12 Joel Christensen wrote: > http://d-programming-language.org/intro-to-datetime.html Thanks Jonathan, that helped I think, (haven't read it all, though). But I've got errors with some of the

Re: is it std.datetime bug?

2015-04-02 Thread drug via Digitalmars-d-learn
On 02.04.2015 09:19, Jonathan M Davis via Digitalmars-d-learn wrote: On Tuesday, March 31, 2015 12:47:34 anonymous via Digitalmars-d-learn wrote: On Tuesday, 31 March 2015 at 11:51:26 UTC, drug wrote: import std.datetime; import std.stdio; void main

Re: is it std.datetime bug?

2015-04-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 31, 2015 12:47:34 anonymous via Digitalmars-d-learn wrote: On Tuesday, 31 March 2015 at 11:51:26 UTC, drug wrote: import std.datetime; import std.stdio; void main() { long.max.SysTime.toISOExtString.writeln; } dmd 2.065 (dpaste.dzfl.pl): +29228-09-14T02

Re: is it std.datetime bug?

2015-03-31 Thread anonymous via Digitalmars-d-learn
On Tuesday, 31 March 2015 at 11:51:26 UTC, drug wrote: import std.datetime; import std.stdio; void main() { long.max.SysTime.toISOExtString.writeln; } dmd 2.065 (dpaste.dzfl.pl): +29228-09-14T02:48:05.4775807 dmd v2.067-devel-c6b489b (using Digger): -29227-04-20T00:11:54.5224191

is it std.datetime bug?

2015-03-31 Thread drug via Digitalmars-d-learn
import std.datetime; import std.stdio; void main() { long.max.SysTime.toISOExtString.writeln; } dmd 2.065 (dpaste.dzfl.pl): +29228-09-14T02:48:05.4775807 dmd v2.067-devel-c6b489b (using Digger): -29227-04-20T00:11:54.5224191 could somebody confirm it?

Re: tiny std.datetime question

2013-01-17 Thread Rob T
On Thursday, 17 January 2013 at 07:17:57 UTC, Jonathan M Davis wrote: I'd still like to break it up a bit, but I'm not going to do it unless some variant of DIP15 or DIP16 is implemented so that it can be done without breaking any code. So, it probably won't be broken up any time soon. It's

tiny std.datetime question

2013-01-16 Thread n00b
Hello, I'm kinda ashamed to ask that here, but std.datetime documentation is so complex... I only want to get hour/minute from a t_time (no timezone). I'm moving to D2, the equivalent code in D1 was: std.date.Date date; date.parse(std.date.toUTCString(time)); date.hour;

Re: tiny std.datetime question

2013-01-16 Thread n00b
Nevermind, found it myself. SysTime* sys = new SysTime(standardTime, UTC()); sys.hour; Le 16/01/2013 08:07, n00b a écrit : Hello, I'm kinda ashamed to ask that here, but std.datetime documentation is so complex... I only want to get hour/minute from a t_time (no timezone). I'm moving to D2

Re: tiny std.datetime question

2013-01-16 Thread Jonathan M Davis
On Wednesday, January 16, 2013 09:15:39 n00b wrote: Nevermind, found it myself. SysTime* sys = new SysTime(standardTime, UTC()); sys.hour; Le 16/01/2013 08:07, n00b a écrit : Hello, I'm kinda ashamed to ask that here, but std.datetime documentation is so complex... I only want to get

Re: tiny std.datetime question

2013-01-16 Thread n00b
Le 16/01/2013 10:54, Jonathan M Davis a écrit : On Wednesday, January 16, 2013 09:15:39 n00b wrote: Nevermind, found it myself. SysTime* sys = new SysTime(standardTime, UTC()); sys.hour; Le 16/01/2013 08:07, n00b a écrit : Hello, I'm kinda ashamed to ask that here, but std.datetime

Re: tiny std.datetime question

2013-01-16 Thread Minas Mina
On Wednesday, 16 January 2013 at 14:15:46 UTC, n00b wrote: Nevermind, found it myself. SysTime* sys = new SysTime(standardTime, UTC()); sys.hour; Le 16/01/2013 08:07, n00b a écrit : Hello, I'm kinda ashamed to ask that here, but std.datetime documentation is so complex... I only want to get

Re: tiny std.datetime question

2013-01-16 Thread Rob T
On Wednesday, 16 January 2013 at 13:07:48 UTC, n00b wrote: Hello, I'm kinda ashamed to ask that here, but std.datetime documentation is so complex... You'll likely have a much easier time reading this. http://vibed.org/temp/d-programming-language.org/phobos/std/datetime.html Those pages

Re: tiny std.datetime question

2013-01-16 Thread Jonathan M Davis
On Thursday, January 17, 2013 07:15:14 Rob T wrote: On Wednesday, 16 January 2013 at 13:07:48 UTC, n00b wrote: Hello, I'm kinda ashamed to ask that here, but std.datetime documentation is so complex... You'll likely have a much easier time reading this. http://vibed.org/temp/d

Re: tiny std.datetime question

2013-01-16 Thread Rob T
On Thursday, 17 January 2013 at 06:26:21 UTC, Jonathan M Davis wrote: On Thursday, January 17, 2013 07:15:14 Rob T wrote: On Wednesday, 16 January 2013 at 13:07:48 UTC, n00b wrote: Hello, I'm kinda ashamed to ask that here, but std.datetime documentation is so complex... You'll likely have

Re: tiny std.datetime question

2013-01-16 Thread Jonathan M Davis
On Thursday, January 17, 2013 07:57:51 Rob T wrote: Yeah, I was amazed at how much simpler things became after better formatting and organization was applied. Beforehand people were asking for std.datetime to be broken up, but no need anymore, although maybe the part on benchmarking

std.datetime TimeOfDay missing 'add' method?

2012-09-20 Thread ixid
TimeOfDay's roll function refers to an add method which would increment or decrement the next greater unit of time when it wraps a unit of time. This method seems to be absent, while DateTime has it.

Re: std.datetime TimeOfDay missing 'add' method?

2012-09-20 Thread ixid
Actually I see DateTime's method is days and months only, why aren't hours, minutes and seconds available?

Re: std.datetime TimeOfDay missing 'add' method?

2012-09-20 Thread Ali Çehreli
On 09/20/2012 09:02 AM, ixid wrote: TimeOfDay's roll function refers to an add method I see how The difference between rolling and adding ... implies that there is also an add() function just like there is a roll() function. In fact, adding is handled simply by operator overloading. You can

Re: std.datetime TimeOfDay missing 'add' method?

2012-09-20 Thread Jonathan M Davis
On Thursday, September 20, 2012 18:02:04 ixid wrote: TimeOfDay's roll function refers to an add method which would increment or decrement the next greater unit of time when it wraps a unit of time. This method seems to be absent, while DateTime has it. Create a Duration and use +. e.g. auto

Re: Formatting dates in std.datetime?

2012-04-21 Thread Stewart Gordon
repeated-letter format specifiers similar to those found in some other schemes, and designed to be logical, natural-looking, extensible and easy to remember. It doesn't currently have functions to convert between its types and those in std.datetime, but it's straightforward to construct

Formatting dates in std.datetime?

2012-04-20 Thread H. S. Teoh
Is there a way to format std.datetime.Date objects with a custom format string? In particular, I'd like to reuse month short names defined in std.datetime, but it appears that the names are private. I'd really rather not duplicate them by hand, if there's a way to get them. Alternatively

Re: Formatting dates in std.datetime?

2012-04-20 Thread Jonathan M Davis
On Friday, April 20, 2012 13:29:34 H. S. Teoh wrote: Is there a way to format std.datetime.Date objects with a custom format string? In particular, I'd like to reuse month short names defined in std.datetime, but it appears that the names are private. I'd really rather not duplicate them

Re: Get current date and time with std.datetime

2011-10-24 Thread Jonathan M Davis
On Friday, October 07, 2011 19:58:12 Joel Christensen wrote: http://d-programming-language.org/intro-to-datetime.html Thanks Jonathan, that helped I think, (haven't read it all, though). But I've got errors with some of the date times not being able to change them with int's values.

Get current date and time with std.datetime

2011-10-07 Thread Joel Christensen
Hi, I have a program that uses the old time stuff before the module std.datetime. I have a DateTime object, but I can't seem to set its properties to the current time. Some thing like: DateTime dateTime; dateTime = getCurrentDateTime(); -JoelCNZ

Re: Get current date and time with std.datetime

2011-10-07 Thread Jonathan M Davis
On Friday, October 07, 2011 19:08:33 Joel Christensen wrote: Hi, I have a program that uses the old time stuff before the module std.datetime. I have a DateTime object, but I can't seem to set its properties to the current time. Some thing like: DateTime dateTime; dateTime

Re: Get current date and time with std.datetime

2011-10-07 Thread Jacob Carlborg
On 2011-10-07 08:15, Jonathan M Davis wrote: On Friday, October 07, 2011 19:08:33 Joel Christensen wrote: Hi, I have a program that uses the old time stuff before the module std.datetime. I have a DateTime object, but I can't seem to set its properties to the current time. Some thing like

Re: Get current date and time with std.datetime

2011-10-07 Thread Jonathan M Davis
On Friday, October 07, 2011 08:23:10 Jacob Carlborg wrote: On 2011-10-07 08:15, Jonathan M Davis wrote: On Friday, October 07, 2011 19:08:33 Joel Christensen wrote: Hi, I have a program that uses the old time stuff before the module std.datetime. I have a DateTime object, but I can't

Re: Get current date and time with std.datetime

2011-10-07 Thread Jonathan M Davis
before the module std.datetime. I have a DateTime object, but I can't seem to set its properties to the current time. Some thing like: DateTime dateTime; dateTime = getCurrentDateTime(); http://d-programming-language.org/intro-to-datetime.html May I suggest that you put

Re: Get current date and time with std.datetime

2011-10-07 Thread Joel Christensen
http://d-programming-language.org/intro-to-datetime.html Thanks Jonathan, that helped I think, (haven't read it all, though). But I've got errors with some of the date times not being able to change them with int's values. task.d(44): Error: function std.datetime.DateTime.month () const is

Re: Get current date and time with std.datetime

2011-10-07 Thread Jacob Carlborg
a program that uses the old time stuff before the module std.datetime. I have a DateTime object, but I can't seem to set its properties to the current time. Some thing like: DateTime dateTime; dateTime = getCurrentDateTime(); http://d-programming-language.org/intro-to-datetime.html May I suggest

Re: std.datetime impenetrable

2011-09-16 Thread Kagamin
Steve Teale Wrote: Alternatively, let me explain my desire. When my program first runs, I want to hazard a guess as to what size of paper the user is likely to use - US Letter Size, or A4/inches or metric. Do you wanna say all pdfs from america are done in letter size and won't print right

Re: std.datetime impenetrable

2011-09-16 Thread Kagamin
Steve Teale Wrote: Anyway, how would you do it? You need a compatibility layer like http://en.wikipedia.org/wiki/Freedesktop.org They already can have solution or you can consult with them.

Re: std.datetime impenetrable

2011-09-15 Thread Jonathan M Davis
and so on would be SOL. Anyway, how would you do it? Determining the exact time zone that the computer is in is really hard. It's actually pretty easy to do in Windows, but on Posix... not so much. So, there's no function in std.datetime to do it. If I can ever figure out how to sanely do

Re: std.datetime impenetrable

2011-09-15 Thread Steve Teale
Oh, so it is difficult after all! I thought it was just me. So I am probably going to have to ask. Then the interesting question will be which way around will offend fewest people. I have installed it as ISO, then have to ask US users if they would prefer Letter Size, or the other way round

Re: std.datetime impenetrable

2011-09-15 Thread Jonathan M Davis
. Though hopefully std.datetime manages to make most of it fairly easy and pleasant to deal with. So I am probably going to have to ask. Then the interesting question will be which way around will offend fewest people. I have installed it as ISO, then have to ask US users if they would prefer

Re: std.datetime impenetrable

2011-09-15 Thread Mike Wey
On 09/15/2011 07:48 PM, Steve Teale wrote: Alternatively, let me explain my desire. When my program first runs, I want to hazard a guess as to what size of paper the user is likely to use - US Letter Size, or A4/inches or metric. GTK does not seem to want to tell me about the default printer

std.datetime for month integer

2011-07-18 Thread dsmith
Recall that std.date used the following to retrieve a month in integer form (0 .. 11): auto Now = std.date.getUTCtime(); writeln(std.date.monthFromTime(Now)); Using std.datetime, the following yields the abbreviated month name: auto Now = Clock.currTime(); writefln(%s, Now.month

Re: how to migrate to std.datetime

2011-05-09 Thread Russel Winder
This material is really great, but why isn't it directly associated with the std.datetime package somewhere? My second reaction was Jonathan should not have had to write such a long email in reply, he should have been able to say 'Please go read URL' for an explanation. Jonathan, Please can you

Re: how to migrate to std.datetime

2011-05-09 Thread Jonathan M Davis
documentation page? My reaction was very much This material is really great, but why isn't it directly associated with the std.datetime package somewhere? My second reaction was Jonathan should not have had to write such a long email in reply, he should have been able to say 'Please go read

Re: how to migrate to std.datetime

2011-05-09 Thread Russel Winder
On Sun, 2011-05-08 at 23:52 -0700, Jonathan M Davis wrote: [ . . . ] I could look at writing an article on moving from std.date to std.datetime, I suppose. We already have an article contest going, and it would make sense to put such an article on the site. I suspect many people would

Re: how to migrate to std.datetime

2011-05-09 Thread Lars T. Kyllingstad
On Mon, 09 May 2011 09:49:04 +0100, Russel Winder wrote: On Sun, 2011-05-08 at 23:52 -0700, Jonathan M Davis wrote: [ . . . ] I could look at writing an article on moving from std.date to std.datetime, I suppose. We already have an article contest going, and it would make sense to put

Re: how to migrate to std.datetime

2011-05-09 Thread Adam D. Ruppe
. Use std.datetime instead. More: wiki link to migration guide When something is renamed, just listing the new name is enough since that's everything you need to know. But a whole new module needs a brain shift and a link can do that better than a one line message. While it looks like everything

Re: how to migrate to std.datetime

2011-05-09 Thread Nick Sabalausky
Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.80.1304923988.14074.digitalmars-d-le...@puremagic.com... I could look at writing an article on moving from std.date to std.datetime, I suppose. We already have an article contest going, and it would make sense to put

how to migrate to std.datetime

2011-05-08 Thread Adam D. Ruppe
I decided to update my compiler today, and regret it for a lot of reasons, but meh. One of the things is std.datetime. A lot of my code uses std.date. It works very, very well for me and I like it. But, the compile process is nagging me about it. I want it to shut up. However, I'm not even

Re: how to migrate to std.datetime

2011-05-08 Thread Jonathan M Davis
On 2011-05-08 17:46, Adam D. Ruppe wrote: I decided to update my compiler today, and regret it for a lot of reasons, but meh. One of the things is std.datetime. A lot of my code uses std.date. It works very, very well for me and I like it. But, the compile process is nagging me about

Re: how to migrate to std.datetime

2011-05-08 Thread Jonathan M Davis
I would point out though that'll be a while before std.date and its related functions actually go away, so any code which needs to be converted to std.datetime definitely has time to be reworked however is appropriate. Currently, they're scheduled for deprecation, which just results

Re: how to migrate to std.datetime

2011-05-08 Thread Adam D. Ruppe
Jonathan M Davis wrote: I would point out though that'll be a while before std.date and its related functions actually go away, so any code which needs to be converted to std.datetime definitely has time to be reworked however is appropriate. Yeah, but I figure it's better to do it sooner

Re: how to migrate to std.datetime

2011-05-08 Thread Jonathan M Davis
On 2011-05-08 21:29, Adam D. Ruppe wrote: Jonathan M Davis wrote: I would point out though that'll be a while before std.date and its related functions actually go away, so any code which needs to be converted to std.datetime definitely has time to be reworked however is appropriate

Re: how to migrate to std.datetime

2011-05-08 Thread Nick Sabalausky
Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.74.1304905547.14074.digitalmars-d-le...@puremagic.com... On 2011-05-08 17:46, Adam D. Ruppe wrote: I decided to update my compiler today, and regret it for a lot of reasons, but meh. One of the things is std.datetime. A lot

std.datetime: Getting unix time from 1970

2011-04-25 Thread Mandeep
I am trying to get the number of seconds from 1970 using the std.datetime module. long val = SysTime(Date(1996, 1, 1)).toUnixTime() Shouldnt the above statement give me a Timezone independent result i.e. 'toUnixTime'. Also, is there a method to get seconds directly from Date and DateTime

Re: std.datetime: Getting unix time from 1970

2011-04-25 Thread Jonathan M Davis
I am trying to get the number of seconds from 1970 using the std.datetime module. long val = SysTime(Date(1996, 1, 1)).toUnixTime() Shouldnt the above statement give me a Timezone independent result i.e. 'toUnixTime'. unix time is _always_ in UTC by definition. You're creating a SysTime

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
in this respect. I understand there is soon to be a replacement, std.datetime, which I suspect will be much easier. When are we likely to see a new release which includes std.datetime? If not relatively soon I presume the easiest thing to do is to download it myself and recompile the phobos library

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
there is soon to be a replacement, std.datetime, which I suspect will be much easier. When are we likely to see a new release which includes std.datetime? If not relatively soon I presume the easiest thing to do is to download it myself and recompile the phobos library to include it. In which case