Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
January 04, 2004 date2str | ||||
---|---|---|---|---|
| ||||
Attachments: | I asked for it a couple of weeks ago, and so I decided I could do it for myself, and here it is: free for anyone to use, Walter can put it in phobos if he feels it's good enough, a set of functions to convert a d_time to a char []. Recognized tokens are available in the source code. This is the very first time I write some kind of parser or whatever, so it may not be optimal or fast or up to what every one is used to, but it works. It works ok in Windows (with some timezones, as I reported before) and apparently the date functions are not ok in Linux, so it's not good all the time. Anyway, if you need it, feel free to use it. ----------------------- Carlos Santander Bernal |
January 04, 2004 Re: date2str | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. | How does it differ from std.date.toDateString()? "Carlos Santander B." <carlos8294@msn.com> wrote in message news:bt81jd$2j3v$1@digitaldaemon.com... > I asked for it a couple of weeks ago, and so I decided I could do it for myself, and here it is: free for anyone to use, Walter can put it in phobos > if he feels it's good enough, a set of functions to convert a d_time to a > char []. Recognized tokens are available in the source code. This is the > very first time I write some kind of parser or whatever, so it may not be > optimal or fast or up to what every one is used to, but it works. > It works ok in Windows (with some timezones, as I reported before) and > apparently the date functions are not ok in Linux, so it's not good all the > time. > Anyway, if you need it, feel free to use it. > > ----------------------- > Carlos Santander Bernal > > > |
January 04, 2004 Re: date2str | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <walter@digitalmars.com> wrote in message news:bt8jpq$cem$1@digitaldaemon.com... | How does it differ from std.date.toDateString()? | That you can specify exactly the format of your time or date, just like you would in Excel, VB, Oracle, MS-SQL, etc. ----------------------- Carlos Santander Bernal |
January 04, 2004 Re: date2str | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. | "Carlos Santander B." <carlos8294@msn.com> wrote in message news:bt9vno$2c5k$1@digitaldaemon.com... > "Walter" <walter@digitalmars.com> wrote in message > news:bt8jpq$cem$1@digitaldaemon.com... > | How does it differ from std.date.toDateString()? > | > > That you can specify exactly the format of your time or date, just like you > would in Excel, VB, Oracle, MS-SQL, etc. Ok! |
January 04, 2004 Re: date2str | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. Attachments: | Sorry, I found a couple of bugs with "month", "W" and "WW". Fixed now. ----------------------- Carlos Santander Bernal |
Copyright © 1999-2021 by the D Language Foundation